mirror of
https://github.com/openai/codex.git
synced 2026-10-27 18:48:37 +00:00
## Why History events queued by the previous thread can repopulate the transcript after a thread switch, mixing old content into the new thread's replay. ## What changed - Reset the transcript immediately and queue another reset before replaying the new thread, covering both snapshot switches and app-server thread replacement. - Leave the alternate screen when resetting, and pause terminal event handling until queued resets finish. - Process queued resets even when the transport is offline. ## Testing Add regression tests for both switch paths, including queued history, an open transcript overlay, and a disconnect before replay events are handled. Snapshot the replacement transcript to verify it contains only the new thread's content. GitOrigin-RevId: b68b07fb10ff35e908c2c184f80859dda637f977