Stopping a Codex turn can leave its two-question form pending even after the server receives an interrupted terminal notification. The session becomes ready, but clients still see the unanswered request and keep the composer blocked.
Ingestion now records an existing user-input.resolved activity for each still-open native callback request belonging to the terminal turn. Already answered requests, newer and child turns, and asynchronous message-mode questions are preserved. The lookup reuses the filtered user-input lifecycle query. No provider response, fabricated answer, schema, or client-specific behavior is added.
Fixes #7820.
Verification#
- Reproduced on b6f72681, committed September 5, 2026 at 00:36:28 UTC. The actual SQLite orchestration engine processed the interrupt command and terminal receipt, but the persisted shell still reported pending input.
- An owned JSON-RPC subprocess exercised the real Codex runtime and adapter. Interrupt acknowledgment followed by an interrupted
turn/completed notification produced no input-resolution event; normal answering did. No provider account or quota was used.
- Before/after fixtures ran the actual web pending-question selector over the persisted projection. The stopped request now disappears. A delayed old-turn completion leaves the new-turn and message-mode requests pending.
- 250 focused tests passed across server ingestion, web session logic and native activity parsing. New regression cases cover completed, interrupted, failed and aborted turns, duplicate terminal receipts, normal answers, newer turns, child turns and message-mode questions. A request already dismissed by a stale-response failure stays dismissed when a terminal resolution is recorded; the new code does not classify errors by prose or add a new error contract.
- Server typecheck and targeted lint passed. No browser, WSL or native-device verification is claimed by these fixtures.
This is a server event-lifecycle repair with no visual component changes. The before/after evidence exercises the actual client selector against the persisted projection. The native Codex request handler can remain awaiting its deferred answer until session close; changing that protocol lifecycle is outside this repair.
Refreshed onto main ce4712d5, which includes the upstream Ubuntu HTTP-to-HTTPS mirror repair. All 250 focused tests, server typecheck, targeted lint and formatting passed again. All executed CI jobs, Bugbot and Effect Service Conventions pass at e2cd2dd8. Approvability and correctness checks skipped the unchanged patch; the approval applies to this head and no review threads remain open. The prior head's infrastructure failure is cleared by this successful new-head run. The prose-classification finding remains fixed. No independent workflow change or check bypass was made.
GPT 6 Astra via Codex in T3 Code.
Note
Medium Risk
Changes orchestration turn-completion behavior for user-input lifecycle; incorrect filtering could dismiss live prompts or leave stale ones pending, but scope is limited to terminal turns and existing activity kinds.
Overview
When a provider turn ends (completed, interrupted, failed, or aborted), provider runtime ingestion now clears native callback user-input prompts that would otherwise stay pending and block the composer.
On terminal turn handling, ingestion loads user-input lifecycle activities, finds open user-input.requested entries for that turn (excluding message-mode async questions), and dispatches user-input.resolved activities labeled “User input dismissed” for each. Already-answered requests, other turns, and message-mode prompts are left alone. ProjectionThreadActivityRepository is wired into the ingestion layer for this lookup.
Tests add readThreadShell / userInputEvent helpers and regression coverage for terminal states, duplicate terminal receipts, stale dismissals, and mixed pending scenarios.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit e2cd2dd8668e84da6c279b332338090a1e51b185. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline:
ce4712d· PR result:e2cd2dd· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.