Skip to content

fix: retry standard subagent turn interrupts during registration - #781

Open
Ludidi wants to merge 1 commit into
agentclientprotocol:mainfrom
Ludidi:fix/subagent-cancel-registration-race
Open

Ludidi wants to merge 1 commit into
agentclientprotocol:mainfrom
Ludidi:fix/subagent-cancel-registration-race

Conversation

@Ludidi

@Ludidi Ludidi commented Nov 19, 2026

Copy link
Copy Markdown

Summary

A standard subagent can advertise cancellation before Codex has registered its turn as interruptible. Both a direct child cancel and a parent cancel currently send one turn/interrupt, so a transient registration error can leave the child running.

This reuses the existing interrupt backoff for those child turns. Each retry targets the original child turn while the router still observes it as current. A mismatched active ID from Codex never retargets the retry. The existing foreground/background selection and completion reporting are preserved.

Related to #641. This extends the cancellation retry fencing from #723 to standard subagents.

Validation

  • Added ACP v1 and v2 regression coverage for direct and parent cancellation, a transient active-ID mismatch, and a stale cancellation after a child turn changes.
  • Ran the subagent cancellation, turn-registration race, and background-work suites.
  • Type checking and build passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant