Bug description
ACP sessions created via sessions_spawn(runtime="acp", thread=true, task="...") can enter a stale "running" state where:
- The session appears in OpenClaw session state as
status: "running"
- The session history shows only the placeholder task — the real task payload was never delivered
- The ACP runtime has no first-class
close or kill operation for these stale sessions
OpenClaw version
OpenClaw 2026.3.31 (213a704)
Steps to reproduce
- Spawn an ACP thread session:
sessions_spawn(runtime="acp", agentId="codex", thread=true, mode="session", task="real task")
- Observe the ACP session creates successfully and a
childSessionKey is returned
- Call
sessions_history(sessionKey="agent:codex:acp:<id>") immediately
- The history shows only the placeholder task, not the real task — the handoff failed silently
- The session remains in
status: "running" indefinitely
- There is no
sessions close <id> or equivalent operation in the ACP runtime API to terminate it
Expected behavior
One of:
sessions_spawn task delivery should succeed reliably, OR
- there should be a first-class
sessions close / sessions kill operation to terminate a stale ACP session
Actual behavior
- Spawn returns success
- Task never lands in session history
- Session stays
running with no cleanup path
- ACP session accumulation with no close/kill mechanism
Workaround observed
The only reliable workaround is to bypass sessions_spawn entirely and drive the ACP harness directly via acpx codex exec one-shot or direct acpx codex sessions new --name <session> / acpx ... -s <session> for persistent sessions. That path does not suffer from the same handoff ambiguity.
Impact
- Stale ACP sessions accumulate in session state with no cleanup path
- Operators cannot reliably recover from failed handoffs — only start replacement sessions
- The lack of a close/kill mechanism makes ACP session lifecycle management incomplete
Labels
bug, bug:behavior
Bug description
ACP sessions created via
sessions_spawn(runtime="acp", thread=true, task="...")can enter a stale "running" state where:status: "running"closeorkilloperation for these stale sessionsOpenClaw version
Steps to reproduce
sessions_spawn(runtime="acp", agentId="codex", thread=true, mode="session", task="real task")childSessionKeyis returnedsessions_history(sessionKey="agent:codex:acp:<id>")immediatelystatus: "running"indefinitelysessions close <id>or equivalent operation in the ACP runtime API to terminate itExpected behavior
One of:
sessions_spawntask delivery should succeed reliably, ORsessions close/sessions killoperation to terminate a stale ACP sessionActual behavior
runningwith no cleanup pathWorkaround observed
The only reliable workaround is to bypass
sessions_spawnentirely and drive the ACP harness directly viaacpx codex execone-shot or directacpx codex sessions new --name <session>/acpx ... -s <session>for persistent sessions. That path does not suffer from the same handoff ambiguity.Impact
Labels
bug, bug:behavior