{"record":{"id":"2e4000a1c6a22381","repo":"NousResearch/hermes-agent","slug":"copilot-acp-did-not-return-a-sessionid","errorCode":null,"errorMessage":"Copilot ACP did not return a sessionId.","messagePattern":"Copilot ACP did not return a sessionId\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/copilot_acp_client.py","lineNumber":647,"sourceCode":"                        }\n                    },\n                    \"clientInfo\": {\n                        \"name\": \"hermes-agent\",\n                        \"title\": \"Hermes Agent\",\n                        \"version\": \"0.0.0\",\n                    },\n                },\n            )\n            session = _request(\n                \"session/new\",\n                {\n                    \"cwd\": self._acp_cwd,\n                    \"mcpServers\": [],\n                },\n            ) or {}\n            session_id = str(session.get(\"sessionId\") or \"\").strip()\n            if not session_id:\n                raise RuntimeError(\"Copilot ACP did not return a sessionId.\")\n\n            text_parts: list[str] = []\n            reasoning_parts: list[str] = []\n            _request(\n                \"session/prompt\",\n                {\n                    \"sessionId\": session_id,\n                    \"prompt\": [\n                        {\n                            \"type\": \"text\",\n                            \"text\": prompt_text,\n                        }\n                    ],\n                },\n                text_parts=text_parts,\n                reasoning_parts=reasoning_parts,\n            )\n            return \"\".join(text_parts), \"\".join(reasoning_parts)","sourceCodeStart":629,"sourceCodeEnd":665,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/copilot_acp_client.py#L629-L665","documentation":"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.","triggerScenarios":"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.","commonSituations":"Version skew between Hermes' ACP client expectations and the installed Copilot CLI; pre-release/beta CLI builds with a different session payload.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    client = CopilotACPClient(...)\nexcept RuntimeError as e:\n    if 'did not return a sessionId' in str(e):\n        # CLI version skew — update or downgrade CLI, then retry\n        ...","preventionTips":["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"],"tags":["copilot","acp","session","protocol"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}