{"record":{"id":"3d49ac11db60a0d9","repo":"NousResearch/hermes-agent","slug":"copilot-acp-process-exited-early-stderr-text","errorCode":null,"errorMessage":"Copilot ACP process exited early: {stderr_text}","messagePattern":"Copilot ACP process exited early: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/copilot_acp_client.py","lineNumber":617,"sourceCode":"\n            stderr_text = \"\\n\".join(stderr_tail).strip()\n            if proc.poll() is not None and stderr_text:\n                if _is_gh_copilot_deprecation_message(stderr_text):\n                    raise RuntimeError(\n                        \"Hermes ACP mode requires the NEW GitHub Copilot CLI \"\n                        \"(github.com/github/copilot-cli), but the binary it just \"\n                        \"spawned is the deprecated `gh copilot` extension.\\n\\n\"\n                        \"Install the new CLI:\\n\"\n                        \"  npm install -g @github/copilot\\n\"\n                        \"  # then verify with: copilot --help\\n\\n\"\n                        \"If `copilot` already resolves to the new CLI but you still see this,\\n\"\n                        \"point Hermes at it explicitly:\\n\"\n                        \"  export HERMES_COPILOT_ACP_COMMAND=/path/to/new/copilot\\n\\n\"\n                        \"Alternative: use the `copilot` provider (no ACP, hits the Copilot API\\n\"\n                        \"directly with a Copilot subscription token) via `hermes setup`.\\n\\n\"\n                        f\"Original error:\\n{stderr_text}\"\n                    )\n                raise RuntimeError(f\"Copilot ACP process exited early: {stderr_text}\")\n            raise TimeoutError(f\"Timed out waiting for Copilot ACP response to {method}.\")\n\n        try:\n            _request(\n                \"initialize\",\n                {\n                    \"protocolVersion\": 1,\n                    \"clientCapabilities\": {\n                        \"fs\": {\n                            \"readTextFile\": True,\n                            \"writeTextFile\": True,\n                        }\n                    },\n                    \"clientInfo\": {\n                        \"name\": \"hermes-agent\",\n                        \"title\": \"Hermes Agent\",\n                        \"version\": \"0.0.0\",\n                    },","sourceCodeStart":599,"sourceCodeEnd":635,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/copilot_acp_client.py#L599-L635","documentation":"The Copilot ACP process terminated before answering the pending JSON-RPC request, and its stderr tail (last 40 lines) did not match the known `gh copilot` deprecation pattern. This RuntimeError surfaces the captured stderr so you can see why the CLI died — crash, panic, missing runtime, auth abort, etc.","triggerScenarios":"During any _request() wait loop: proc.poll() becomes non-None (process exited) with non-empty stderr that is not the deprecation message — e.g. Node crash, missing module, native panic, or OS kill (OOM).","commonSituations":"Corrupted npm install of the Copilot CLI; Node version incompatibility; the CLI being OOM-killed on constrained machines; CLI crashing on startup config.","solutions":["Read the embedded stderr — it names the actual crash cause.","Reinstall the Copilot CLI cleanly: npm uninstall -g @github/copilot && npm install -g @github/copilot.","Check Node.js version compatibility (node -v) and update if the CLI requires a newer runtime.","If OOM is suspected (dmesg), free memory or raise limits and retry."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result = client._request(method, params)\nexcept RuntimeError as e:\n    if 'exited early' in str(e):\n        # stderr is embedded — branch on crash cause (reinstall, node, oom)\n        ...","preventionTips":["Keep the Copilot CLI npm install clean (reinstall on first crash signs)","Maintain a Node runtime version the CLI supports","Watch memory on constrained hosts — OOM-killed CLIs surface here"],"tags":["copilot","acp","crash","process"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}