NousResearch/hermes-agent · error · RuntimeError
Copilot ACP did not return a sessionId.
Error message
Copilot ACP did not return a sessionId.
What it means
The Copilot ACP 'session/new' request succeeded at the JSON-RPC level but the result object had no usable sessionId (empty or whitespace after str()/strip()). Without a session id no 'session/prompt' can be sent, so Hermes aborts immediately after initialize succeeds.
Source
Thrown at agent/copilot_acp_client.py:647
}
},
"clientInfo": {
"name": "hermes-agent",
"title": "Hermes Agent",
"version": "0.0.0",
},
},
)
session = _request(
"session/new",
{
"cwd": self._acp_cwd,
"mcpServers": [],
},
) or {}
session_id = str(session.get("sessionId") or "").strip()
if not session_id:
raise RuntimeError("Copilot ACP did not return a sessionId.")
text_parts: list[str] = []
reasoning_parts: list[str] = []
_request(
"session/prompt",
{
"sessionId": session_id,
"prompt": [
{
"type": "text",
"text": prompt_text,
}
],
},
text_parts=text_parts,
reasoning_parts=reasoning_parts,
)
return "".join(text_parts), "".join(reasoning_parts)View on GitHub (pinned to c896c09c42)
Solutions
- Update the Copilot CLI to the current stable (npm install -g @github/copilot).
- If on a bleeding-edge CLI, downgrade to the last stable version.
- Report to Hermes maintainers with CLI version if a current stable build still omits sessionId.
Defensive patterns
Strategy: try-catch
Try / catch
try:
client = CopilotACPClient(...)
except RuntimeError as e:
if 'did not return a sessionId' in str(e):
# CLI version skew — update or downgrade CLI, then retry
... Prevention
- Use current stable Copilot CLI releases with Hermes ACP mode
- Avoid pre-release CLI builds in automation
- Report version pairs that omit sessionId to maintainers
When it happens
Trigger: session/new returns {}, null, or {'sessionId': ''} — typically a Copilot CLI version that changed the session result shape, or a CLI build that requires an extra handshake step before issuing sessions.
Common situations: Version skew between Hermes' ACP client expectations and the installed Copilot CLI; pre-release/beta CLI builds with a different session payload.
Related errors
- ACP file-system paths must be absolute.
- Copilot ACP {method} failed: {err.get('message') or err}
- 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/2e4000a1c6a22381.
Report an issue: GitHub.