NousResearch/hermes-agent · error · RuntimeError
Copilot ACP {method} failed: {err.get('message') or err}
Error message
Copilot ACP {method} failed: {err.get('message') or err} What it means
A JSON-RPC request to the Copilot ACP process returned an error response: the reply message contained an 'error' object, and this RuntimeError surfaces its message (or the raw error). It indicates the Copilot CLI itself rejected the request — e.g. initialize/session/prompt failed server-side — rather than a transport failure.
Source
Thrown at agent/copilot_acp_client.py:596
msg = inbox.get(timeout=0.1)
except queue.Empty:
continue
if self._handle_server_message(
msg,
process=proc,
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"View on GitHub (pinned to c896c09c42)
Solutions
- Read the embedded error message — it comes straight from the Copilot CLI and names the actual cause.
- Sign in / refresh Copilot auth (copilot auth login or the CLI's login flow) and retry.
- Update the Copilot CLI (npm install -g @github/copilot) to resolve protocol/version mismatches.
- If the error persists, capture ~/.hermes/logs output and report with the exact ACP error text.
Defensive patterns
Strategy: try-catch
Try / catch
try:
result = client._request('session/prompt', {...})
except RuntimeError as e:
if 'ACP' in str(e) and 'failed' in str(e):
# message embeds the CLI's own error — branch on auth vs protocol
... Prevention
- Keep Copilot CLI signed in and entitled before using ACP mode
- Keep CLI version in sync with Hermes expectations
- Read the embedded ACP error text — it names the true cause
When it happens
Trigger: Any _request(method, ...) call — 'initialize', 'session/new', 'session/prompt' — whose matching-id response has an 'error' field. Typical causes: unsupported protocol version, invalid session id, Copilot authentication/entitlement failure, malformed prompt payload.
Common situations: Copilot CLI not signed in or lacking an entitlement; version mismatch between Hermes' ACP expectations and the installed CLI; an expired/kicked session id reused after the process restarted.
Related errors
- ACP file-system paths must be absolute.
- Copilot ACP did not return a sessionId.
- patch content required
- Path '{resolved}' is outside the session cwd '{root}'.
- Could not start Copilot ACP command '{self._acp_command}'. I
AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14).
Data as JSON: /api/errors/dd0acce386b38546.
Report an issue: GitHub.