openclaw - 💡(How to fix) Fix runTimeoutSeconds breaks Claude ACP sessions — set_config_option 'timeout' not supported by Claude Code

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…

When sessions_spawn is called with runTimeoutSeconds for a Claude ACP agent, OpenClaw translates it into a session/set_config_option RPC call with configId: "timeout". Claude Code does not support this config option and returns an error, causing the entire ACP turn to fail with ACP_TURN_FAILED.

Error Message

When sessions_spawn is called with runTimeoutSeconds for a Claude ACP agent, OpenClaw translates it into a session/set_config_option RPC call with configId: "timeout". Claude Code does not support this config option and returns an error, causing the entire ACP turn to fail with ACP_TURN_FAILED. Result: AcpRuntimeError: Internal error: code=ACP_TURN_FAILED {"code": -32603, "message": "Internal error", "data": {"details": "Unknown config option: timeout"}} 4. ACPX treats this error as fatal and reports ACP_TURN_FAILED.

session/set_config_option {"configId":"timeout","value":"30"} → ERROR "Unknown config option: timeout"

Root Cause

  1. OpenClaw's buildRuntimeConfigOptionPairs() in manager-f0OID8yC.js includes timeoutSeconds as a config option pair:

    if (typeof normalized.timeoutSeconds === "number") pairs.set("timeout", String(normalized.timeoutSeconds));
  2. applyManagerRuntimeControls() sends this as session/set_config_option to the ACP agent before the prompt turn.

  3. Claude Code only supports 3 config options: mode, model, effort. It rejects timeout with:

    {"code": -32603, "message": "Internal error", "data": {"details": "Unknown config option: timeout"}}
  4. ACPX treats this error as fatal and reports ACP_TURN_FAILED.

Fix Action

Workaround

Do not pass runTimeoutSeconds when spawning Claude ACP sessions:

sessions_spawn({
  agentId: "claude",
  runtime: "acp",
  task: "...",
  // omit runTimeoutSeconds
})

Code Example

sessions_spawn({
  agentId: "claude",
  runtime: "acp",
  task: "echo hello",
  runTimeoutSeconds: 60  // any value triggers the bug
})

---

if (typeof normalized.timeoutSeconds === "number") pairs.set("timeout", String(normalized.timeoutSeconds));

---

{"code": -32603, "message": "Internal error", "data": {"details": "Unknown config option: timeout"}}

---

>>> initialize → OK
>>> session/load (stale ID)-32002 Resource not found
>>> session/newOK (sessionId returned)
>>> session/set_config_option {"configId":"timeout","value":"30"}ERROR "Unknown config option: timeout"
>>> STDIN END (connection closed, no prompt ever sent)

---

sessions_spawn({
  agentId: "claude",
  runtime: "acp",
  task: "...",
  // omit runTimeoutSeconds
})
RAW_BUFFERClick to expand / collapse

runTimeoutSeconds breaks Claude ACP sessions — set_config_option timeout not supported

Summary

When sessions_spawn is called with runTimeoutSeconds for a Claude ACP agent, OpenClaw translates it into a session/set_config_option RPC call with configId: "timeout". Claude Code does not support this config option and returns an error, causing the entire ACP turn to fail with ACP_TURN_FAILED.

Environment

  • OpenClaw: 2026.5.7
  • @openclaw/acpx: 2026.5.7
  • @agentclientprotocol/claude-agent-acp: 0.32.0 (also tested 0.33.1)
  • Claude Code CLI: 2.1.132
  • acpx: 0.6.1 (also tested 0.7.0)

Reproduction

sessions_spawn({
  agentId: "claude",
  runtime: "acp",
  task: "echo hello",
  runTimeoutSeconds: 60  // any value triggers the bug
})

Result: AcpRuntimeError: Internal error: code=ACP_TURN_FAILED

Root Cause

  1. OpenClaw's buildRuntimeConfigOptionPairs() in manager-f0OID8yC.js includes timeoutSeconds as a config option pair:

    if (typeof normalized.timeoutSeconds === "number") pairs.set("timeout", String(normalized.timeoutSeconds));
  2. applyManagerRuntimeControls() sends this as session/set_config_option to the ACP agent before the prompt turn.

  3. Claude Code only supports 3 config options: mode, model, effort. It rejects timeout with:

    {"code": -32603, "message": "Internal error", "data": {"details": "Unknown config option: timeout"}}
  4. ACPX treats this error as fatal and reports ACP_TURN_FAILED.

Protocol Trace (captured via debug wrapper)

>>> initialize → OK
>>> session/load (stale ID) → -32002 Resource not found
>>> session/new → OK (sessionId returned)
>>> session/set_config_option {"configId":"timeout","value":"30"} → ERROR "Unknown config option: timeout"
>>> STDIN END (connection closed, no prompt ever sent)

Expected Behavior

Either:

  • Option A: OpenClaw should skip set_config_option for keys not advertised by the agent (the session/new response includes configOptions listing supported keys)
  • Option B: OpenClaw should handle timeout as a client-side timer rather than forwarding it to the agent
  • Option C: Gracefully ignore -32603 errors for non-critical config options instead of failing the entire turn

Workaround

Do not pass runTimeoutSeconds when spawning Claude ACP sessions:

sessions_spawn({
  agentId: "claude",
  runtime: "acp",
  task: "...",
  // omit runTimeoutSeconds
})

Notes

  • The applyManagerRuntimeControls function already retrieves capabilities.configOptionKeys and checks advertisedKeys, but it throws when the key is not advertised rather than skipping it.
  • Codex ACP agent handles timeout differently (it's explicitly skipped in the ACPX runtime code for Codex), but no such handling exists for Claude.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING