Files
codex/codex-rs/tui/src
Charlie Marsh bf2aee99c5 Avoid rollout reads for configured TUI sessions (#39731)
## 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
2026-08-20 15:42:40 +00:00
..
2026-07-29 13:53:15 +00:00