NousResearch/hermes-agent · error · RuntimeError

Copilot ACP process exited early: {stderr_text}

Error message

Copilot ACP process exited early: {stderr_text}

What it means

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.

Source

Thrown at agent/copilot_acp_client.py:617

            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(
                "initialize",
                {
                    "protocolVersion": 1,
                    "clientCapabilities": {
                        "fs": {
                            "readTextFile": True,
                            "writeTextFile": True,
                        }
                    },
                    "clientInfo": {
                        "name": "hermes-agent",
                        "title": "Hermes Agent",
                        "version": "0.0.0",
                    },

View on GitHub (pinned to c896c09c42)

Solutions

  1. Read the embedded stderr — it names the actual crash cause.
  2. Reinstall the Copilot CLI cleanly: npm uninstall -g @github/copilot && npm install -g @github/copilot.
  3. Check Node.js version compatibility (node -v) and update if the CLI requires a newer runtime.
  4. If OOM is suspected (dmesg), free memory or raise limits and retry.
Defensive patterns

Strategy: try-catch

Try / catch

try:
    result = client._request(method, params)
except RuntimeError as e:
    if 'exited early' in str(e):
        # stderr is embedded — branch on crash cause (reinstall, node, oom)
        ...

Prevention

When it happens

Trigger: 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).

Common situations: Corrupted npm install of the Copilot CLI; Node version incompatibility; the CLI being OOM-killed on constrained machines; CLI crashing on startup config.

Related errors


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