Skip to content

Select Model Menu Still Shows Pre-Switch Model List - Codex

Quick fix

Close existing Codex sessions, run codex app-server daemon restart, and upgrade CC Switch to v4.0.7 or later for detection and restart prompts.

Error output
Select Model 菜单仍然显示切换前 provider(A)的模型列表,重开 TUI 窗口也无效。只有彻底杀掉所有 codex 进程后重开,才会显示新 provider 的模型。
English translation

The Select Model menu still shows the model list from the previous provider (A), and reopening the TUI window does not help. The new provider's models appear only after completely killing all codex processes and reopening it.

Codex's `app-server daemon` reads `config.toml` and `model_catalog_json` only once at startup. The TUI then retrieves its cached model catalog through the `model/list` interface. Although CC Switch rewrites the on-disk configuration when switching provider, direct, or routing mode, a running daemon does not reread it. As a result, `/model` still shows the pre-switch catalog; reopening only the TUI or terminal window may continue using the same daemon.

The issue was reproduced with codex-cli 0.160.0 on Windows and codex-cli 0.159.2 on Windows and Linux. CC Switch v4.0.0 introduced partial stale-catalog detection, and v4.0.7 extended detection and restart prompts to direct, routing, and aggregation modes. It still cannot make a running Codex instance reload the catalog automatically.

  1. First close existing Codex sessions connected to the shared daemon to avoid interrupting active work during the restart.

  2. Run `codex app-server daemon restart`, then restart Codex. Users, reproducers, and maintainers confirmed that this command makes the daemon reread the current model catalog.

  3. Upgrade CC Switch to v4.0.7 or later. After switching direct, routing, or aggregation mode, restart the Codex background service when prompted about a stale model catalog.

  4. If you only use a manually started TUI, you can temporarily bypass the shared daemon with `codex --no-daemon`, making that session read the current configuration directly. This option does not apply to `codex exec`, the desktop app, or editor plugins.

  5. If daemon restart cannot be run, terminate all Codex processes on Windows and restart them. This interrupts existing sessions and should be used only as a manual workaround.

ToolCodex
Versioncodex-cli 0.159.2 - 0.160.0(已复现受影响版本)
PlatformsWindowsLinux
Why does reopening the Codex TUI after switching provider not update the model list?
The reopened TUI still connects to the resident `app-server daemon`. The cache is stored in daemon memory, not in the TUI window, so you must run `codex app-server daemon restart`.
Can I avoid restarting the daemon?
When using the TUI manually, you can run `codex --no-daemon` so the session starts its own server and reads the current `config.toml`. However, `codex exec` has no such option, and it does not affect the desktop app or editor plugins.
After upgrading CC Switch, will a running Codex automatically reread the model catalog?
No. Starting with v4.0.7, CC Switch detects stale catalogs in direct, routing, and aggregation modes and prompts you to restart, but you must still restart the Codex background service as instructed.
Why does the status bar show the new model while `/model` still shows the old one?
The status bar can read the new `config.toml`, while the `/model` candidate list comes from the daemon's cached `model/list`. Because they use different data sources, they may temporarily disagree after switching modes.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.