Skip to content

ACP runs fail with ACP_TURN_FAILED via OpenClaw, while direct acpx CLI succeeds #28708

@mikejacksonS2F

Description

@mikejacksonS2F

Summary

ACP sessions launched via OpenClaw are consistently failing with AcpRuntimeError: Internal error (code=ACP_TURN_FAILED) for Claude (and likely other ACP agents), even though the underlying acpx CLI and agent execution work directly on the host.

Environment

  • OpenClaw: 2026.2.26 (stable)
  • OS: macOS 26.3 (arm64)
  • Node: 25.6.1
  • ACP backend plugin: acpx (plugin-local pinned binary)

ACP/OpenClaw config (effective)

  • acp.enabled=true
  • acp.dispatch.enabled=true
  • acp.backend="acpx"
  • acp.defaultAgent="claude"
  • acp.allowedAgents=["pi","claude","codex","opencode","gemini"]
  • Discord thread spawn enabled: channels.discord.threadBindings.spawnAcpSessions=true

Also enabled during debugging:

  • tools.sessions.visibility=all
  • tools.agentToAgent.enabled=true

Reproduction steps

  1. Ensure ACP backend is enabled and ready (acpx plugin loaded).
  2. Spawn ACP run through OpenClaw tools/flow, e.g.:
    • sessions_spawn with runtime:"acp", agentId:"claude", mode:"run", thread:true
    • task: Reply with exactly: ACP Claude smoke test successful
  3. Observe gateway result/logs.

Observed behavior

OpenClaw returns:

  • AcpRuntimeError: Internal error
  • code=ACP_TURN_FAILED

Example failing run IDs:

  • 588f265d-358b-43e3-b047-94415e8b5087
  • ef76363a-18e4-4f9e-9c5f-7f2c1e61a569
  • 66767e7f-b751-439b-9fe7-0f1b7d3ce26a
  • c905f30a-2c42-4ff8-9f02-365ee5bd5c9c
  • ff9b1508-206a-4179-aefd-955e3f15721f
  • 0d56d2e4-8284-45ec-8bd9-0cf5c6f3391e

Representative log line:
[ws] ⇄ res ✗ agent errorCode=UNAVAILABLE errorMessage=AcpRuntimeError: Internal error runId=<id> error=AcpRuntimeError: Internal error: code=ACP_TURN_FAILED

Expected behavior

ACP run should complete normally and return the assistant text from the target agent.

Critical control test (passes)

Direct host invocation via pinned acpx binary succeeds:

/opt/homebrew/lib/node_modules/openclaw/extensions/acpx/node_modules/.bin/acpx claude exec "Reply exactly: ACP Claude direct CLI test successful"

Output:

  • ACP Claude direct CLI test successful

This suggests the issue is in OpenClaw ACP bridge/handoff path rather than Claude CLI auth/runtime itself.

Additional notes

  • Earlier policy error (ACP_DISPATCH_DISABLED) was fixed and no longer applies.
  • acpx config schema was validated and corrected during debugging.
  • Problem persists across permission policy variants after schema-correct settings.

Request

Please advise whether this is a known regression in 2026.2.26 ACP bridge path and whether there is:

  1. a config workaround,
  2. a patch version with fix, or
  3. additional diagnostics to collect (preferably with per-run internal exception detail beyond ACP_TURN_FAILED).

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions