Environment
- OpenClaw 2026.4.12 (1c0672b), acpx 0.5.3, Node v25.9.0, macOS 15.4 arm64
- ACP agent: acpx backend, claude agent, persistent mode
- Bound to Discord standard text channel
Symptom
Every message to the ACP channel returns:
ACP error (ACP_TURN_FAILED): Internal error
The acpx backend works fine when invoked manually (acpx claude exec "hello" succeeds from the same cwd). Gateway logs show acp startup identity reconcile: checked=1 resolved=0 failed=1 on every restart.
Timeline
- Agent was working normally (successful prompts at 15:05 SGT)
- Multiple gateway restarts occurred (15:00–18:28) due to config edits
- After restarts, all ACP prompts fail — the gateway holds a stale
backendSessionIdfor an acpx session that no longer exists - 2 of 3 ACP agents stuck in
state: "error", 1 is fine (idle)
Workarounds Attempted (All Failed)
/acp cancel— session state remains"error", identity not cleared- Manual edit of
sessions.json(resetstatetoidle, clearidentity) — gateway overwrites from in-memory state on next prompt - Deleting the
.jsonlsession file — no effect