Repository navigation
Description
What variant of Codex are you using?
Codex App (macOS desktop, bundled CLI 0.159.0), also applies to any long-running codex app-server / TUI session
What feature would you like to see?
A supported way to make a running app-server (and the Desktop model picker) re-read model_catalog_json without restarting the process.
Motivation. model_catalog_json is a documented integration point for proxies and custom providers (we run a local routing proxy that rewrites the catalog file when its provider table changes). Today the catalog is captured in memory at process start and nothing can refresh it:
StaticModelsManageris built once fromconfig.model_catalogat startup (codex-rs/app-server/src/message_processor.rsviabuild_models_manager,codex-rs/core/src/thread_manager.rs) andStaticModelsManager::raw_model_catalogignores everyRefreshStrategy(codex-rs/models-manager/src/manager.rs).reload_user_config(the hot-reload path behindconfig/batchWritewithreloadUserConfig: true) rebuildsConfigobjects for loaded threads, butThreadManager.state.models_manageris never replaced, so the picker keeps serving the startup catalog.- The background
ModelsRefreshWorker(every 4.5 min) callslist_models(RefreshStrategy::Online), which is a no-op for the static manager. - There are no POSIX-signal handlers for config/catalog reload (only SIGINT/SIGTERM shutdown in
codex-rs/app-server-transport/src/transport/stdio.rs).
Live experiment confirming the gap. We started an app-server pointed at a 26-model catalog, then updated the same file to 30 models (4 new) and called config/batchWrite with edits: [] and reloadUserConfig: true. The RPC returned status: ok (config reload succeeded, config.toml untouched), but model/list still returned 26 models and none of the new ones. New threads did not see the new models either, because session model resolution goes through the same captured manager (codex-rs/core/src/session/mod.rs).
What we currently have to do: fully restart the Desktop app (or the daemon) after every catalog change. Short-lived processes (codex exec, fresh TUI connections) pick up the new file immediately, which makes the staleness confusing to diagnose — behavior differs per surface.
Proposals (any one would unblock us):
- An app-server RPC such as
model/catalog/reloadthat rebuilds the models manager from the currentmodel_catalog_jsonand pushes a picker-update notification to connected clients. - A file watcher / mtime check on the catalog path consulted by
model/list(perhaps gated behind a config flag). - Making
StaticModelsManagerhonor aRefreshStrategy::Onlineby re-reading the file, so the existingModelsRefreshWorkerpicks changes up within its 4.5-minute interval.
Additional information
Related existing issues that describe symptoms of the same root cause, from different angles:
- [Desktop][Launch blocker] Stale model_catalog_json silently hides newly launched models #43052 — stale
model_catalog_jsonsilently hides newly launched models (Desktop launch blocker) - model_catalog_json is resolved once at startup: context window cannot follow a provider switch, so Codex over-fills the prompt and upstream returns 400 #47917 — catalog resolved once at startup;
context_windowcannot follow a provider switch - Desktop: model_catalog_json loaded but custom models not shown in picker (regression, related to #32349) #34487 — custom models from
model_catalog_jsonnot shown in Desktop picker - [macOS] Desktop model picker stays on GPT-5.6 although GPT-6 catalog and access work #48697 — stale catalog keeps the Desktop picker on an older model family
All of these would be mitigated by a reload capability; today the only remediation is a process restart, which is hard to automate for a desktop app and easy to forget.
Activity
MaiHoangViet1809 commentedon Oct 27, 2026
Also seeing this when using codex-router on macOS with the Desktop-bundled runtime
0.164.0-alpha.11.1.The router updates the valid JSON file referenced by
model_catalog_json, but the running app-server keeps returning the previous list frommodel/list.In an isolated reproduction:
model/listagain: it still returns 17 models.config/batchWritewithreloadUserConfig: truedid not refresh the list in the existing process either.It would be helpful if changes to the custom catalog were picked up automatically and reflected in the Desktop model picker, without restarting Codex. This would let router integrations keep the available model list current as providers add or update models.