Repository navigation
Conversation
Codex makes one more model call after a final send before its turn ends, so the request's working handoff, and with it the agent's working reactions and typing, outlasted its reply by about 3s. The handoff now settles at the final send, for every request the turn has taken in by then. The turn itself still ends on its own: interrupting it would leave a <turn_aborted> note in Codex's history after every reply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Bradley Axen <baxen@squareup.com>
baxen
force-pushed
the
baxen/codex-final-ends-turn
branch
from
October 11, 2026 18:45
cb17263 to
df94400
Compare
Collaborator
Author
|
🤖 Folded into #860 (show agents working) to keep the merge stack small. Branch kept. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Codex doesn't end its turn when it sends a reply with
final: true. It makes one more model call that returns nothing, then ends the turn about 3s later. That call is visible in the #buzzin-in-secret rollouts. Until now, the request'sworkingUntilhandoff settled only when the turn ended, so the agent's working reactions and typing (#860, #861) lingered past its reply.The handoff now settles as soon as a final send succeeds. That covers every request the turn has taken in by then: the first one and each steered follow-up. A follow-up steered in after the send keeps counting as working until its own answer.
Why not end the turn
Claude Code ends its turn on a final send through a hook. The Codex app-server has no matching option, so the only way to end the turn is
turn/interrupt. Codex then writes a<turn_aborted>note into the session after every reply: "The user interrupted the previous turn on purpose…". The model would read that note on every later turn, andlive.mjsalready asserts that ordinary final sends leave no such note. So the turn still ends by itself, and only the "working" signal moves. That extra model call still happens; it is cheap, with cached context and no output.Validation
vitest run src/bundled/codex src/bundled/claude-code src/features/agents2 src/features/relay/typing: 218 tests pass.tsc --noEmitis clean.answered()call removed, the first two tests fail.🤖 Generated with Claude Code