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
fix(codex): late-child cancellation waits on its serial reader #331
What: A late Codex child outside an explicit cut-in can block the native reader for ten seconds while waiting for its own interrupt reply. Why: Its turn-start handler awaits a request whose acknowledgement the same serial reader must parse. So what: Reproduce and repair the ordinary lifecycle path separately; #285 removes the request only for its governed urgent cohort.
Outcome and proof
CodexAdapterV2.emitSubagentProviderTurnStarted awaits turn/interrupt under turnTerminalizationPermit. The actual effect-codex-app-server protocol/client await each notification handler before reading the next input line. No native CLI failure is claimed. Reproduce using the actual stdio client: gate the interrupt answer, send a sentinel behind it and require that sentinel to be consumed without advancing a timeout. Register the child before bounded cancellation outside the reader; preserve native outcomes, ordinary Stop, goal continuations and exact identity.
This advances truthful Promachos/Drafter work in the Objective. This is source-level evidence on555f0a00198b7aba75d8e8ce13af9c7d983712f4, independently inspected after Opus R7 identified it, not a native runtime reproduction. Searches of open/closed Codex issues found no dedicated report; #299 concerns soft-restart subscriber handover, a related but different mechanism.
Non-goals and blockers
No expansion or waiver of #285, shared app-server kill, version, deployment or live data mutation. A faithful reproduction and current upstream search are required before selecting implementation. Use actual adapters/services and native I/O gates, Deferred/persisted milestones and no sleeps or polling.
Requirements and who asked: Global Work requires recording adjacent problems discovered by #285's design; the user requires truthful native work and useful Stop controls. Deleted: No new cancellation architecture, public intent, liveness registry, polling barrier or unsupported OS-exit promise. Bottleneck: The handler and its awaited reply share one serial reader. Checked myself: Actual late-child branch, permit/timeout, protocol/client notification ordering, R7 D-1 and related issue searches; runtime proof remains pending.
Upstream search (before implementation): pingdotgg/t3code main at 28c32d20c3 carries the same awaited turn/interrupt in emitSubagentProviderTurnStarted. Searches of upstream Issues and PRs ("late subagent interrupt", "codex-late-subagent-interrupt", "serial reader interrupt codex", "subagent interrupt timeout", "turn/interrupt notification handler") found no report or fix.
Branch: fix/331-codex-late-child-cancel, head ff996cb3a6e4024302b5ba2d7f0ef7a5f9668800, base 406c3ef86d.
Reproduction: new test in the CodexAdapterV2 cut-in cohort harness (production adapter, real effect-codex-app-server stdio client). Before the fix the reader sentinel behind the unanswered late-child turn/interrupt timed out the test (15 s); a disposable TestClock probe showed it still blocked at 9 s and released at 10 s, the interrupt timeout. After the fix it passes with no clock advance.
Proof: vp test run apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts 190 passed; targeted vp lint no new findings; apps/server typecheck exit 0; scripts/fork-check.sh OK.
Activity
lukemaj commentedon Oct 18, 2026
Upstream search (before implementation): pingdotgg/t3code main at
28c32d20c3carries the same awaitedturn/interruptinemitSubagentProviderTurnStarted. Searches of upstream Issues and PRs ("late subagent interrupt", "codex-late-subagent-interrupt", "serial reader interrupt codex", "subagent interrupt timeout", "turn/interrupt notification handler") found no report or fix.Handoff: reproduced and fixed in #495
fix/331-codex-late-child-cancel, headff996cb3a6e4024302b5ba2d7f0ef7a5f9668800, base406c3ef86d.CodexAdapterV2 cut-in cohortharness (production adapter, realeffect-codex-app-serverstdio client). Before the fix the reader sentinel behind the unanswered late-childturn/interrupttimed out the test (15 s); a disposable TestClock probe showed it still blocked at 9 s and released at 10 s, the interrupt timeout. After the fix it passes with no clock advance.vp test run apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts190 passed; targetedvp lintno new findings;apps/servertypecheck exit 0;scripts/fork-check.shOK.Model and harness: Claude Opus 5.5 via Claude Code (T3 Code).
fix(codex): late child interrupt no longer blocks the native reader (#…
fix(codex): late child interrupt no longer blocks the native reader (#…