Respect final-answer boundaries for queued agent mail - #33367
Merged
copyberry[bot] merged 1 commit intoJul 15, 2026
Merged
Conversation
## Why Queue-only child-agent updates that arrive around a final answer should not restart sampling, but they must remain available to the next turn. Explicitly injected response items still need to reopen the current turn. ## What changed - Defer queue-only inter-agent mail after a final answer without treating it as same-turn pending input. - Re-enable current-turn mailbox delivery when the model requests a follow-up, a stop hook continues the turn, or a response item is explicitly injected. - Check for turn-triggering mailbox work after clearing the completed active turn so pending work can start safely. ## Testing Added coverage that queued child mail waits for the next user turn and that an injected response item after a final answer triggers a follow-up request. GitOrigin-RevId: aa81d00707943284b7ab069b60970e547908c895
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/aa81d00707943284b7ab069b60970e547908c895
branch
from
July 15, 2026 15:49
0e22a23 to
c28770a
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/aa81d00707943284b7ab069b60970e547908c895
branch
July 15, 2026 15:50
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Respect final-answer boundaries for queued agent mail
Why
Queue-only child-agent updates that arrive around a final answer should not
restart sampling, but they must remain available to the next turn. Explicitly
injected response items still need to reopen the current turn.
What changed
same-turn pending input.
a stop hook continues the turn, or a response item is explicitly injected.
turn so pending work can start safely.
Testing
Added coverage that queued child mail waits for the next user turn and that an
injected response item after a final answer triggers a follow-up request.