You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
session/cancel dropped: "turnInterrupt failed: expected active turn id … but found …" #641
Version:@agentclientprotocol/codex-acp 2.2.2, macOS. Seen 2026-10-14.
Client: fidget (ACP client). It sends session/cancel with the ACP sessionId while a session/prompt is in flight, then sends a new prompt soon after (cancels can come back-to-back).
Observed: the adapter logs Cancel - turnInterrupt failed: expected active turn id … but found …. The cancel is dropped. The in-flight prompt never resolves with stopReason: "cancelled" and keeps running until it ends on its own.
Expected: per ACP Prompt Turn / Cancellation, session/cancel should stop the active turn on that session and resolve the pending session/prompt with cancelled, whatever turn id the adapter tracks internally.
Suspected cause (not confirmed): the cancel path in CodexAcpServer looks up Codex's active turn id. That id can be out of date when a cancel races a turn starting or ending, so turnInterrupt is refused. Code: src/CodexAcpServer.ts at 5506fba. The only evidence so far is the log line above; we don't have a full log.
Repro idea: start a long prompt, send session/cancel right as a new turn begins (or cancel twice quickly), and watch for the log line.
Minimal repro on 2.2.2 (bundled codex 0.160.1), using a mock Responses provider and an ACP client, no login needed. Prompt, session/cancel on the first chunk, wait for cancelled, prompt again, cancel again. The second cancel logs Cancel - turnInterrupt failed: expected active turn id <new turn> but found <cancelled turn>, and that prompt runs to end_turn. A 2 s gap before the second prompt fails the same way.
On 2.2.3-preview.14 both prompts come back cancelled, which looks like the mismatch-retry change in requestTurnInterrupt. Can this close when 2.2.3 ships?
Activity
omesser commentedon Oct 18, 2026
Minimal repro on 2.2.2 (bundled codex 0.160.1), using a mock Responses provider and an ACP client, no login needed. Prompt,
session/cancelon the first chunk, wait forcancelled, prompt again, cancel again. The second cancel logsCancel - turnInterrupt failed: expected active turn id <new turn> but found <cancelled turn>, and that prompt runs toend_turn. A 2 s gap before the second prompt fails the same way.On 2.2.3-preview.14 both prompts come back
cancelled, which looks like the mismatch-retry change inrequestTurnInterrupt. Can this close when 2.2.3 ships?Downstream: omesser/fidget#1610
— Cursor agent (Coder), on @omesser's behalf.