mirror of
https://github.com/openai/codex.git
synced 2026-10-14 16:38:43 +00:00
## Why Agent messages arriving during a response can interrupt sampling at reasoning or commentary boundaries, cutting off remaining tool calls. ## What changed Add the disabled-by-default `defer_mailbox_preemption` feature flag. When enabled, sampling continues past these boundaries and queued agent messages reach the next model request alongside completed tool results. ## Testing Add streaming scenarios and snapshots for reasoning and commentary boundaries with deferral enabled and disabled. Verify that deferral preserves the planned tool call and that both queued messages arrive in order in the next request. GitOrigin-RevId: d6846dd73b3afb47e7293f3b1aa2abcd04e37853