footer model information does not get updated when switching to plan mode and back

Open 💬 1 comment Opened Mar 27, 2026 by fingon

What version of Codex CLI is running?

0.117.0

What subscription do you have?

plus

Which model were you using?

_No response_

What platform is your computer?

_No response_

What terminal emulator and version are you using (if applicable)?

_No response_

What issue are you seeing?

When using shift-tab to switch to plan mode and back, as I have configured different reasoning level, it does not get reflected in the UI. (I hit shift tab after starting codex in the screenshot):

<img width="486" height="220" alt="Image" src="https://github.com/user-attachments/assets/dbae94b2-efc0-4245-809a-ea64d4289da0" />

What steps can reproduce the bug?

Choose different reasoning levels for normal and plan mode. Use shift-tab.

What is the expected behavior?

Footer to show current reasoning level.

Additional information

It would be nice to be able to choose separate model for plan mode too.

Here's what Codex proposed to fix this:

  # Fix Status Bar Refresh on Plan-Mode Model Switches

  ## Summary

  Make ChatWidget the owner of status-surface refreshes whenever the effective
  model, reasoning effort, or collaboration mode changes, so switching into or
  out of Plan mode immediately updates the footer/status line. Mirror the same
  fix in both codex-rs/tui and codex-rs/tui_app_server.

  ## Implementation Changes

  - In codex-rs/tui/src/chatwidget.rs and codex-rs/tui_app_server/src/
    chatwidget.rs, centralize model-dependent UI refresh in one helper.
  - That helper should refresh:
      - session header model text
      - model-dependent composer affordances
      - footer/status line
      - terminal title where applicable
  - Call that helper from all mutators that can change the effective status-
    bar model or reasoning:
      - set_model
      - set_reasoning_effort
      - set_plan_mode_reasoning_effort
      - set_collaboration_mask
  - Keep the effective model source unchanged: status-line items should
    continue to render from current_model() / effective reasoning, but now the
    refresh happens immediately after the mask/model change.
  - Remove the now-redundant app-level refresh_status_surfaces() calls after
    UpdateModel, UpdateReasoningEffort, and UpdateCollaborationMode in codex-
    rs/tui/src/app.rs and codex-rs/tui_app_server/src/app.rs so refresh
    ownership is not split between App and ChatWidget.

  ## Test Plan

  - Add a targeted test in tui chatwidget tests:
      - configure tui_status_line = ["model-name"]
      - switch to a Plan mask with a different model
      - assert the status line updates immediately without calling
        refresh_status_surfaces() manually
      - switch back to Default and assert it restores the default-mode model
  - Add the same regression test in tui_app_server chatwidget tests.
  - Add snapshot coverage for the rendered footer/status line in the Plan-
    mode-with-different-model state in both crates, so the visible UI state is
    locked down.
  - Verification commands after implementation:
      - cd codex-rs && just fmt
      - cd codex-rs && cargo test -p codex-tui
      - cd codex-rs && cargo test -p codex-tui-app-server
      - cd codex-rs && just argument-comment-lint
      - cd codex-rs && just fix -p codex-tui
      - cd codex-rs && just fix -p codex-tui-app-server

  ## Assumptions

  - “Status bar” here is the configurable footer status line, not only the /
    status command output.
  - The bug should be fixed in both tui and tui_app_server, per the repo’s
    parallel-implementation rule.
  - No config/schema/API changes are needed; this is a refresh-ownership bug,
    not a data-model bug.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗