mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
## Why Different backends can return the same thread ID. A Cloud environment selection must apply to the draft on the backend that opened the picker. When the TUI reads or resumes a specific thread, an unexpected server response can otherwise attach history or apply settings to the wrong thread. ## What changed - Match Cloud environment selections against both the backend and the draft thread ID. - Reject mismatched thread IDs in read and resume flows before hydrating history or applying resume permission settings. Preserve subscription bookkeeping so a rejected resume can still be cleaned up. ## Testing Add regression coverage for a thread start that reuses an ID from another backend and a mismatched resume that preserves the active conversation, composer draft, and approval override without sending a settings update. GitOrigin-RevId: 603efe7aa37e510dacf91b58487a94469c7f183d