NousResearch/hermes-agent · error · RuntimeError

Hermes ACP mode requires the NEW GitHub Copilot CLI (github.

Error message

Hermes ACP mode requires the NEW GitHub Copilot CLI (github.com/github/copilot-cli), but the binary it just spawned is the deprecated `gh copilot` extension.

Install the new CLI:
  npm install -g @github/copilot
  # then verify with: copilot --help

If `copilot` already resolves to the new CLI but you still see this,
point Hermes at it explicitly:
  export HERMES_COPILOT_ACP_COMMAND=/path/to/new/copilot

Alternative: use the `copilot` provider (no ACP, hits the Copilot API
directly with a Copilot subscription token) via `hermes setup`.

Original error:
{stderr_text}

What it means

The spawned Copilot process exited and its stderr matches the `gh copilot` deprecation banner: Hermes ACP mode launched the deprecated GitHub Copilot extension instead of the new standalone CLI (github.com/github/copilot-cli). The long message embeds install instructions, an escape hatch to point HERMES_COPILOT_ACP_COMMAND at the correct binary, and the original stderr as evidence.

Source

Thrown at agent/copilot_acp_client.py:603

                    cwd=self._acp_cwd,
                    text_parts=text_parts,
                    reasoning_parts=reasoning_parts,
                ):
                    continue

                if msg.get("id") != request_id:
                    continue
                if "error" in msg:
                    err = msg.get("error") or {}
                    raise RuntimeError(
                        f"Copilot ACP {method} failed: {err.get('message') or err}"
                    )
                return msg.get("result")

            stderr_text = "\n".join(stderr_tail).strip()
            if proc.poll() is not None and stderr_text:
                if _is_gh_copilot_deprecation_message(stderr_text):
                    raise RuntimeError(
                        "Hermes ACP mode requires the NEW GitHub Copilot CLI "
                        "(github.com/github/copilot-cli), but the binary it just "
                        "spawned is the deprecated `gh copilot` extension.\n\n"
                        "Install the new CLI:\n"
                        "  npm install -g @github/copilot\n"
                        "  # then verify with: copilot --help\n\n"
                        "If `copilot` already resolves to the new CLI but you still see this,\n"
                        "point Hermes at it explicitly:\n"
                        "  export HERMES_COPILOT_ACP_COMMAND=/path/to/new/copilot\n\n"
                        "Alternative: use the `copilot` provider (no ACP, hits the Copilot API\n"
                        "directly with a Copilot subscription token) via `hermes setup`.\n\n"
                        f"Original error:\n{stderr_text}"
                    )
                raise RuntimeError(f"Copilot ACP process exited early: {stderr_text}")
            raise TimeoutError(f"Timed out waiting for Copilot ACP response to {method}.")

        try:
            _request(

View on GitHub (pinned to c896c09c42)

Solutions

  1. Install the new CLI: npm install -g @github/copilot and verify with copilot --help.
  2. If both exist, point Hermes explicitly: export HERMES_COPILOT_ACP_COMMAND=/path/to/new/copilot.
  3. Remove or rename the deprecated `gh copilot` shim so the new binary wins on PATH.
  4. Or switch to the direct 'copilot' provider (no ACP) via hermes setup.

Example fix

# before: 'copilot' → old gh extension
npm uninstall -g github-copilot-cli 2>/dev/null || gh extension remove copilot
# after
npm install -g @github/copilot
export HERMES_COPILOT_ACP_COMMAND=$(which copilot)
Defensive patterns

Strategy: validation

Validate before calling

import shutil, subprocess

def resolves_to_new_cli() -> bool:
    path = shutil.which('copilot')
    if not path:
        return False
    out = subprocess.run([path, '--version'], capture_output=True, text=True).stdout
    return 'gh' not in out.lower()  # crude check; prefer explicit pin below

Try / catch

try:
    client = CopilotACPClient(...)
except RuntimeError as e:
    if 'deprecated `gh copilot` extension' in str(e):
        # npm install -g @github/copilot; or set HERMES_COPILOT_ACP_COMMAND; retry
        ...

Prevention

When it happens

Trigger: 'copilot' on PATH resolves to the old `gh copilot` extension shim; the process dies immediately after spawn and _is_gh_copilot_deprecation_message(stderr_tail) matches its output.

Common situations: Systems where the legacy GitHub CLI extension was installed years ago and shadows the new npm package; PATH ordering placing the old shim first; upgrading Hermes without upgrading Copilot tooling.

Related errors


AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14). Data as JSON: /api/errors/2275e97d1c4df95b. Report an issue: GitHub.