mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
## Why The TUI caches the terminal's default colors at startup. If the terminal switches from dark to light while an external editor is open, the composer can still use the old background tint when Codex regains control. ## What changed - On supported local Kitty, Ghostty, and Rex sessions, query the default foreground and background through the TUI input stream after returning from the editor. Redraw when the reported colors change. - Drain pending terminal reports before opening the editor, suspending, or exiting. If the drain times out before an editor handoff or suspension, keep the TUI active, preserve input, and show an error. ## Testing Add pseudo-terminal tests for the updated composer tint, stale Enter handling on editor handoff, and draft preservation and report draining after editor and suspend timeouts. GitOrigin-RevId: 7f438a7df26d602bf975695c27a9f431432d16cf