mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why A newly started thread may not have materialized its rollout before the TUI receives `ThreadStarted`. Trying to infer session state from that path can wait through rollout reader retries even when a lifecycle response already provided the authoritative session. ## What changed - Preserve session state already stored for a known thread instead of inferring it again from `ThreadStarted`. - Continue updating agent-picker metadata from the notification. - Restrict fallback session inference to newly observed `ThreadStarted` notifications that do not already have session state. ## Testing Added a startup test that verifies a known thread routes `ThreadStarted` immediately, retains its configured session, buffers the notification, and updates agent metadata when the rollout does not exist yet. GitOrigin-RevId: 7ed98fb46df17566c4a61ac677f60fc8d94f7321