openclaw - 💡(How to fix) Fix [Bug]: ACPX forwards unsupported `set_config_option {configId:"timeout"}` to non-Codex ACP agents, causing `ACP_TURN_FAILED`

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Every sessions_spawn for agentId="claude" (or any non-Codex ACP agent) through OpenClaw's embedded acpx runtime fails with AcpRuntimeError: Internal error: code=ACP_TURN_FAILED because the runtime sends session/set_config_option {configId: "timeout", value: "120"} after session/new, and @agentclientprotocol/claude-agent-acp rejects it as Unknown config option: timeout (JSON-RPC -32603).

Error Message

Gateway journal (failure path)

12:41:03 [ws] ⇄ res ✗ agent errorCode=UNAVAILABLE errorMessage=AcpRuntimeError: Internal error runId=cc0dbf92-73df-4e79-8ad4-37187cf69bf7 error=AcpRuntimeError: Internal error: code=ACP_TURN_FAILED

Stdio tap on claude-agent-acp/dist/index.js (relevant lines)

IN (openclaw → claude-agent-acp)

{"id":0,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":true,"writeTextFile":true},"terminal":true},"clientInfo":{"name":"acpx","version":"0.1.0"}}} {"id":1,"method":"session/load","params":{"sessionId":"<old>","cwd":"/home/timamz","mcpServers":[]}} {"id":2,"method":"session/new","params":{"cwd":"/home/timamz","mcpServers":[]}} {"id":3,"method":"session/set_config_option","params":{"sessionId":"<new>","configId":"timeout","value":"120"}}

OUT (claude-agent-acp → openclaw)

{"id":0,"result":{...capabilities...}} {"id":1,"error":{"code":-32002,"message":"Resource not found: <old>"}} # expected on first run {"id":2,"result":{"sessionId":"<new>",...}} {"id":3,"error":{"code":-32603,"message":"Internal error","data":{"details":"Unknown config option: timeout"}}}

claude-agent-acp 0.32.0 only advertises mode/model/effort as configIds

(acp-agent.js throws "Unknown config option: ${params.configId}" otherwise)

Same env, same wrapper, driven directly over stdio outside the runtime:

→ init OK → session/new OK → session/prompt → stopReason=end_turn, real listing of ~/

Root Cause

Every sessions_spawn for agentId="claude" (or any non-Codex ACP agent) through OpenClaw's embedded acpx runtime fails with AcpRuntimeError: Internal error: code=ACP_TURN_FAILED because the runtime sends session/set_config_option {configId: "timeout", value: "120"} after session/new, and @agentclientprotocol/claude-agent-acp rejects it as Unknown config option: timeout (JSON-RPC -32603).

Fix Action

Fix / Workaround

Workaround for users on 2026.5.7: patch the installed bundle at ~/.openclaw/npm/node_modules/@openclaw/acpx/dist/runtime-B3LWev_t.js, hoist the key === "timeout" || key === "timeout_seconds" short-circuit out of the codex-only branch, then systemctl --user restart openclaw-gateway.service.

Code Example

# Gateway journal (failure path)
12:41:03 [ws] ⇄ res ✗ agent errorCode=UNAVAILABLE
  errorMessage=AcpRuntimeError: Internal error
  runId=cc0dbf92-73df-4e79-8ad4-37187cf69bf7
  error=AcpRuntimeError: Internal error: code=ACP_TURN_FAILED

# Stdio tap on claude-agent-acp/dist/index.js (relevant lines)
# IN  (openclaw → claude-agent-acp)
{"id":0,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":true,"writeTextFile":true},"terminal":true},"clientInfo":{"name":"acpx","version":"0.1.0"}}}
{"id":1,"method":"session/load","params":{"sessionId":"<old>","cwd":"/home/timamz","mcpServers":[]}}
{"id":2,"method":"session/new","params":{"cwd":"/home/timamz","mcpServers":[]}}
{"id":3,"method":"session/set_config_option","params":{"sessionId":"<new>","configId":"timeout","value":"120"}}

# OUT (claude-agent-acp → openclaw)
{"id":0,"result":{...capabilities...}}
{"id":1,"error":{"code":-32002,"message":"Resource not found: <old>"}}   # expected on first run
{"id":2,"result":{"sessionId":"<new>",...}}
{"id":3,"error":{"code":-32603,"message":"Internal error","data":{"details":"Unknown config option: timeout"}}}

# claude-agent-acp 0.32.0 only advertises mode/model/effort as configIds
# (acp-agent.js throws "Unknown config option: ${params.configId}" otherwise)

# Same env, same wrapper, driven directly over stdio outside the runtime:
# → init OK → session/new OK → session/prompt → stopReason=end_turn, real listing of ~/
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Every sessions_spawn for agentId="claude" (or any non-Codex ACP agent) through OpenClaw's embedded acpx runtime fails with AcpRuntimeError: Internal error: code=ACP_TURN_FAILED because the runtime sends session/set_config_option {configId: "timeout", value: "120"} after session/new, and @agentclientprotocol/claude-agent-acp rejects it as Unknown config option: timeout (JSON-RPC -32603).

Steps to reproduce

  1. Install OpenClaw 2026.5.7 with the default acpx plugin enabled and configure a claude ACP agent (agents.list[].runtime.type=acp, runtime.acp.agent="claude", backend="acpx").
  2. Trigger the main agent's sessions_spawn tool for agent="claude" from any channel — e.g. via Telegram: spawn claude to list files in home directory and tell me the result.
  3. Observe the gateway journal returns errorCode=UNAVAILABLE / code=ACP_TURN_FAILED within ~6 seconds. The same @agentclientprotocol/claude-agent-acp 0.32.0 binary, spawned over stdio outside the runtime with the identical env, accepts initialize → session/new → session/prompt and returns stopReason: end_turn with a real directory listing.

Expected behavior

sessions_spawn for agent="claude" should complete the same way it does for agent="codex": the spawned agent receives initialize, session/new, and session/prompt, and returns stopReason: end_turn. The runtime should not send set_config_option keys that the target ACP backend does not advertise as supported.

Actual behavior

The spawn ends ~6s after handshake with AcpRuntimeError: Internal error: code=ACP_TURN_FAILED. A stdio tap on claude-agent-acp/dist/index.js shows the underlying JSON-RPC error returned to the runtime is -32603 Internal error with data.details: "Unknown config option: timeout", emitted from session/set_config_option {configId:"timeout", value:"120"} immediately after session/new succeeds.

OpenClaw version

2026.5.7 (commit eeef486)

Operating system

Ubuntu 24.04.3 LTS, kernel 6.17, x64

Install method

npm global via nvm (~/.nvm/versions/node/v24.14.1/lib/node_modules/openclaw), Node 24.14.1; @openclaw/acpx 2026.5.7 from ~/.openclaw/npm/node_modules/@openclaw/acpx; bundled @agentclientprotocol/claude-agent-acp 0.32.0 + claude CLI 2.1.126.

Model

openai/gpt-5.5 for the main agent. Spawned subagent runs @agentclientprotocol/claude-agent-acp with default model id (= Opus 4.7 1M).

Provider / routing chain

openclawopenai-codex main runtime (api: openai-responses) → proxyapi.ru → OpenAI.

Additional provider/model setup details

Main agent: agentRuntime.id=codex, model.primary=openai/gpt-5.5. Spawned subagent: runtime.type=acp, runtime.acp.agent="claude", runtime.acp.backend="acpx". The acpx plugin config has timeoutSeconds: 900, but the runtime forwards value:"120" (the schema default) — a secondary defect noted below.

Logs, screenshots, and evidence

# Gateway journal (failure path)
12:41:03 [ws] ⇄ res ✗ agent errorCode=UNAVAILABLE
  errorMessage=AcpRuntimeError: Internal error
  runId=cc0dbf92-73df-4e79-8ad4-37187cf69bf7
  error=AcpRuntimeError: Internal error: code=ACP_TURN_FAILED

# Stdio tap on claude-agent-acp/dist/index.js (relevant lines)
# IN  (openclaw → claude-agent-acp)
{"id":0,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":true,"writeTextFile":true},"terminal":true},"clientInfo":{"name":"acpx","version":"0.1.0"}}}
{"id":1,"method":"session/load","params":{"sessionId":"<old>","cwd":"/home/timamz","mcpServers":[]}}
{"id":2,"method":"session/new","params":{"cwd":"/home/timamz","mcpServers":[]}}
{"id":3,"method":"session/set_config_option","params":{"sessionId":"<new>","configId":"timeout","value":"120"}}

# OUT (claude-agent-acp → openclaw)
{"id":0,"result":{...capabilities...}}
{"id":1,"error":{"code":-32002,"message":"Resource not found: <old>"}}   # expected on first run
{"id":2,"result":{"sessionId":"<new>",...}}
{"id":3,"error":{"code":-32603,"message":"Internal error","data":{"details":"Unknown config option: timeout"}}}

# claude-agent-acp 0.32.0 only advertises mode/model/effort as configIds
# (acp-agent.js throws "Unknown config option: ${params.configId}" otherwise)

# Same env, same wrapper, driven directly over stdio outside the runtime:
# → init OK → session/new OK → session/prompt → stopReason=end_turn, real listing of ~/

Impact and severity

  • Affected: All users running OpenClaw with any non-Codex ACP agent (Claude via @agentclientprotocol/claude-agent-acp; presumably any other ACP backend that does not advertise timeout as a supported configId).
  • Severity: High — sessions_spawn for the affected agents is completely non-functional, the main agent's tool call returns UNAVAILABLE, and announce paths can cascade-fail.
  • Frequency: Always — 100% reproducible on every spawn attempt.
  • Consequence: Multi-agent orchestration through ACP is broken end-to-end on stock 2026.5.7. The Internal error surface obscures the cause, leading users (and several closed-stale issues) to mis-attribute the failure to auth, sandbox, or proxy problems.

Additional information

Where the bug lives. extensions/acpx/src/runtime.ts AcpxRuntime.setConfigOption (#L886-L928 on main) only short-circuits key === "timeout" | "timeout_seconds" inside the isCodexAcpCommand(command) branch. For non-Codex agents the key falls through to delegate.setConfigOption(input) and reaches the ACP wire. timeout is an acpx-runtime concept (derived from plugins.entries.acpx.config.timeoutSeconds); no ACP agent we've checked treats it as a session config option.

Why this slipped past existing tests. extensions/acpx/src/runtime.test.ts includes forwards timeout config controls for non-Codex ACP agents (added in d3e4640, “fix(acpx): ignore Codex ACP timeout config”), which asserts the implementation-level forwarding but uses a mocked delegate that never exercises a real ACP backend's rejection.

Plausibly the same cause behind these closed-stale issues: #30346, #35861, #28708, #31065, #31273, #31686.

Workaround for users on 2026.5.7: patch the installed bundle at ~/.openclaw/npm/node_modules/@openclaw/acpx/dist/runtime-B3LWev_t.js, hoist the key === "timeout" || key === "timeout_seconds" short-circuit out of the codex-only branch, then systemctl --user restart openclaw-gateway.service.

Secondary defect (separate from this report): the user-configured plugins.entries.acpx.config.timeoutSeconds value is not actually threaded to the wire — we observed value:"120" despite a configured 900. Once timeout no longer reaches the agent, this is purely cosmetic, but the caller-side plumbing is still wrong and worth a follow-up.

PR with the fix and the test flip: timamz/openclaw#<filled after PR open>.

<sub>AI-assisted report.</sub>

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

sessions_spawn for agent="claude" should complete the same way it does for agent="codex": the spawned agent receives initialize, session/new, and session/prompt, and returns stopReason: end_turn. The runtime should not send set_config_option keys that the target ACP backend does not advertise as supported.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: ACPX forwards unsupported `set_config_option {configId:"timeout"}` to non-Codex ACP agents, causing `ACP_TURN_FAILED`