Skip to content

Respect final-answer boundaries for queued agent mail - #33367

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/aa81d00707943284b7ab069b60970e547908c895
Jul 15, 2026
Merged

Respect final-answer boundaries for queued agent mail#33367
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/aa81d00707943284b7ab069b60970e547908c895

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 15, 2026

Copy link
Copy Markdown

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

  • 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.

## 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
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/aa81d00707943284b7ab069b60970e547908c895 branch from 0e22a23 to c28770a Compare July 15, 2026 15:49
@copyberry
copyberry Bot merged commit c28770a into main Jul 15, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/aa81d00707943284b7ab069b60970e547908c895 branch July 15, 2026 15:50
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants