openclaw - 💡(How to fix) Fix acpx: `sessions_spawn timeoutSeconds` mistranslated to a config option the claude-agent-acp backend rejects

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 runtime: "acp", agentId: "claude", and timeoutSeconds: N, the runtime forwards that as a JSON-RPC session/set_config_option(configId: "timeout") call to the claude-agent-acp backend. @agentclientprotocol/[email protected] does not understand a config option with that id and rejects the request, which unwinds the connection and surfaces as ACP_TURN_FAILED to the caller. (The real reason is hidden by the lossy toAcpRuntimeError wrapping — see companion bug report.)

End-user impact: callers must omit timeoutSeconds for the claude runtime. There is no documented warning that this option is unsupported on this harness; the failure is opaque and hard to attribute without reading the raw stream log.

Error Message

// → ACP_TURN_FAILED: Internal error 2. Surface a typed unsupported-option error from the runtime when the backend rejects a config option, so the caller can omit the option and retry — instead of unwinding the whole session.

Root Cause

When sessions_spawn is called with runtime: "acp", agentId: "claude", and timeoutSeconds: N, the runtime forwards that as a JSON-RPC session/set_config_option(configId: "timeout") call to the claude-agent-acp backend. @agentclientprotocol/[email protected] does not understand a config option with that id and rejects the request, which unwinds the connection and surfaces as ACP_TURN_FAILED to the caller. (The real reason is hidden by the lossy toAcpRuntimeError wrapping — see companion bug report.)

Fix Action

Fix / Workaround

Workaround until fixed

Code Example

await sessions_spawn({
  runtime: "acp",
  agentId: "claude",
  task: "echo hi",
  timeoutSeconds: 60,   // ← this is what breaks
});
// → ACP_TURN_FAILED: Internal error
RAW_BUFFERClick to expand / collapse

Repo: openclaw/openclaw Component: @openclaw/acpx (ACP harness) Found: 2026-05-11 while bringing up Claude Code via ACP on macOS.

Summary

When sessions_spawn is called with runtime: "acp", agentId: "claude", and timeoutSeconds: N, the runtime forwards that as a JSON-RPC session/set_config_option(configId: "timeout") call to the claude-agent-acp backend. @agentclientprotocol/[email protected] does not understand a config option with that id and rejects the request, which unwinds the connection and surfaces as ACP_TURN_FAILED to the caller. (The real reason is hidden by the lossy toAcpRuntimeError wrapping — see companion bug report.)

End-user impact: callers must omit timeoutSeconds for the claude runtime. There is no documented warning that this option is unsupported on this harness; the failure is opaque and hard to attribute without reading the raw stream log.

Reproduction

await sessions_spawn({
  runtime: "acp",
  agentId: "claude",
  task: "echo hi",
  timeoutSeconds: 60,   // ← this is what breaks
});
// → ACP_TURN_FAILED: Internal error

Drop timeoutSeconds and the spawn succeeds.

Suggested fix

Either:

  1. Drop timeoutSeconds from the outbound config-option translation for the claude runtime (the backend doesn't support it), and enforce the timeout in-process on the OpenClaw side instead.
  2. Surface a typed unsupported-option error from the runtime when the backend rejects a config option, so the caller can omit the option and retry — instead of unwinding the whole session.

Option 1 matches operator expectations better. Option 2 is a more general fix that would benefit other ACP backends with different config-option support.

Workaround until fixed

Omit timeoutSeconds when spawning the claude ACP runtime. (Document in MEMORY.md so the next agent operator doesn't trip on it.)

Environment

  • OpenClaw 2026.5.7
  • macOS 15 (arm64), Node 24.15.0
  • @openclaw/acpx from npm ~/.openclaw/npm/node_modules/@openclaw/acpx/
  • @agentclientprotocol/[email protected]

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