mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Draining every queued active-thread event in one foreground pass can overrun the frame budget. Buffered thread events can also race ahead of queued replay and startup app events, causing the TUI to switch views before the corresponding history and operations have been applied. ## What changed - Bound active-thread draining to one target frame interval and leave remaining notifications queued for a later frame. - Prioritize queued app events over active-thread events so replay state is applied before buffered closures or other thread notifications. - Block startup input only for pending requests, rather than ordinary queued notifications whose draining yielded at the frame deadline. - Leave selected side-thread closure handling to the foreground event loop. ## Testing Added tests covering deadline-limited notification draining and foreground handling of a selected side thread closing. GitOrigin-RevId: 41080d3df13ca308eec1ea0fbb0ba067a4640c4c