TUI: /status shows wrong model in multi-agent sessions (Selected model vs turn_context.model)
What version of Codex CLI is running?
codex-cli 0.106.0
What subscription do you have?
Team
Which model were you using?
- TUI
/statusshows:gpt-5.2(reasoningxhigh) - But the session rollout (
turn_context) shows the effective model is:gpt-5.3-codex
What platform is your computer?
macOS 15.7.4 (Apple Silicon)
What terminal emulator and version are you using (if applicable)?
zsh
What issue are you seeing?
In multi-agent / collab sessions, the TUI /status (and the header “Model:” line) can show a different model than the one actually used for the active thread.
This is extremely confusing because it becomes impossible to tell which model is actually answering.
Evidence (sanitized)
TUI /status (for a spawned agent thread):
Model: gpt-5.2 (reasoning xhigh, summaries detailed)
But the corresponding rollout contains turn_context with model=gpt-5.3-codex:
{"timestamp":"2026-02-27T18:52:21.984Z","type":"turn_context","payload":{"model":"gpt-5.3-codex","effort":"xhigh","approval_policy":"never","collaboration_mode":{"mode":"default","settings":{"model":"gpt-5.3-codex","reasoning_effort":"xhigh"}}}}
Also, codex-tui.log shows the app-level selection can differ from the resumed session model (paths redacted):
INFO codex_tui::app: Selected model: gpt-5.2, Selected effort: xhigh
WARN session_init: codex_core::codex: resuming session with different model: previous=gpt-5.2, current=gpt-5.3-codex
What steps can reproduce the bug?
I don’t yet have a perfectly minimal repro, but it seems to involve:
- Starting a multi-agent / collab session where at least one thread ends up with a different
turn_context.modelthan the app’s selected model. - Switching into that thread in the TUI.
- Running
/status(or looking at the header).
What is the expected behavior?
/status should show the effective model for the active thread (ideally from the latest turn_context / session context), not a stale app-level selection.
If the app model is global, then the UI should still reflect the actual model used; or show both “Selected model” vs “Effective model” when they differ.
Additional information
Possibly related (same surface area: collaboration modes / model state): #9766, #9783, #11013.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for looking.
Here’s additional evidence + a likely code-level root cause (sanitized, no tokens).
Extra evidence (logs + rollout)
1) TUI still considers the selected model =
gpt-5.2From
codex-tui.log(timestamps from a multi-agent collab run):2) But the spawned agent thread rollout is consistently
gpt-5.3-codexIn the agent thread rollout, every
turn_context.payload.modelisgpt-5.3-codex(no switches).First
turn_context(trimmed):(Separately, the same thread’s
/statusoutput in TUI showedModel: gpt-5.2 …— that mismatch is the core bug here.)3) Another worktree shows the same “model state drift” symptom
From a different worktree (
260101_details), I can reproduce model drift on resume:And the same session’s rollout shows a
turn_contexttransitiongpt-5.2 -> gpt-5.3-codexshortly after resume.Likely root cause in TUI (code pointers)
The
/status“Model:” line is ultimately coming fromChatWidget::model_display_name()→ChatWidget::current_model()./statuspath:codex-rs/tui/src/chatwidget.rs:add_status_output()passesself.model_display_name()codex-rs/tui/src/status/card.rs: renders that string as the “Model” rowcurrent_model()prefersactive_collaboration_mask.modelovercurrent_collaboration_mode.model:codex-rs/tui/src/chatwidget.rs:current_model()on_session_configured()updatescurrent_collaboration_modefromSessionConfiguredEvent.model, BUT it does not sync/clearactive_collaboration_mask.model.codex-rs/tui/src/chatwidget.rs:on_session_configured()So if
active_collaboration_mask.modelstill holds the previous thread’s model (e.g. the app’s selectedgpt-5.2), it will override the newly configured session’s model (e.g.gpt-5.3-codex) for:/statusmodel displaycurrent_model()Minimal fix sketch
In
ChatWidget::on_session_configured(), aftermodel_for_headeris known, ensure the active mask can’t override it with stale state. For example:(or clear
mask.modelsocurrent_model()falls back tocurrent_collaboration_mode.model).Happy to provide more rollouts/log excerpts if you want specific thread IDs / timelines.
Will fix thanks
Quick follow-up: on
codex-cli 0.115.0I no longer see this in my current usage.I scanned my local sessions from March 17, 2026 (including multi-agent runs) and did not find fresh instances of the earlier symptom: no new model-drift warnings in the TUI log, and the rollout
turn_context.modelvalues were consistent in the post-upgrade sessions I checked.I have not re-run a deliberately mixed-model repro yet, so this is not full repro coverage, but for day-to-day usage this looks resolved on
0.115.0.Thanks.