Windows app launches stale cached app-server runtime (0.142.0) instead of current one — causes "model requires a newer version of Codex" and corrupts shared models_cache.json
What version of the Codex App are you using (From "About Codex" dialog)?
26.707.3748.0 (Microsoft Store, package OpenAI.Codex)
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26220.0 x64
What issue are you seeing?
The app rejected gpt-5.6-sol in an existing conversation with:
The 'gpt-5.6-sol' model requires a newer version of Codex. Please upgrade to the latest app or CLI and try again.
No update was available: winget upgrade --id 9PLM9XGG6VKS --source msstore and the Store's own update scan (WinRT AppInstallManager.SearchForAllUpdatesAsync) both reported the app current. The same model worked fine from the standalone CLI 0.144.1 on the same machine and account (codex exec -m gpt-5.6-sol → OK).
Root cause I traced on my machine:
ChatGPT.exespawned its backend as
%LOCALAPPDATA%\OpenAI\Codex\bin\38dff8711e296435\codex.exe -c features.code_mode_host=true app-server --analytics-default-enabled
That binary embeds CLI version 0.142.0 (provisioned Jun 26).
- A current runtime was sitting right next to it —
%LOCALAPPDATA%\OpenAI\Codex\bin\a7c12ebff69fb123\embeds 0.144.0 (provisioned Jul 9) — and the app package itself bundles 0.144.0 inapp\resources\codex.exe. The app still launched the stale hash. This looks like the same stale-versioned-path pattern reported in #30270, but for the core app-server runtime rather than plugins. - Because the server gates models by client version, the 0.142.0 app-server was denied
gpt-5.6-sol, producing the misleading "upgrade" error on an up-to-date install. - Cross-client side effect: the stale app-server periodically rewrote the shared
~/.codex/models_cache.jsonstamped"client_version": "0.142.0"and without the gpt-5.6 model entries — degrading model metadata for every other Codex client on the machine that shares that cache. I suspect this mechanism is behind the "Model metadata for gpt-5.6-sol not found; defaulting to fallback metadata" reports in #31826 and #31869.
What steps can reproduce the bug?
I can't force the app to pin a stale runtime on demand, but the broken state is easy to detect when present:
# 1. Which binary is the app's backend actually running?
Get-CimInstance Win32_Process -Filter "Name='codex.exe'" |
Where-Object { $_.CommandLine -like '*app-server*' } |
Select-Object ProcessId, ExecutablePath
# parent process is ChatGPT.exe
# 2. Embedded CLI version of each cached runtime (no version resource on the exe;
# grep the binary for its version string)
Get-ChildItem "$env:LOCALAPPDATA\OpenAI\Codex\bin" -Directory | ForEach-Object {
$exe = Join-Path $_.FullName 'codex.exe'
if (Test-Path $exe) {
$v = Select-String -Path $exe -Pattern 'version: [0-9.]+' -AllMatches -Encoding oem |
ForEach-Object { $_.Matches.Value } | Select-Object -First 1
"$($_.Name) $v"
}
}
# 3. Who last wrote the shared models cache, and which models it contains
Get-Content "$env:USERPROFILE\.codex\models_cache.json" -Raw |
ConvertFrom-Json | Select-Object client_version, fetched_at,
@{n='slugs';e={$_.models.slug -join ', '}}
Broken state observed: app-server running from a hash dir embedding 0.142.0 while a 0.144.0 hash dir exists; models_cache.json stamped client_version: 0.142.0 with no gpt-5.6-* slugs.
What is the expected behavior?
The app should launch the app-server from the newest provisioned runtime (or the binary bundled in its own package), and never let an older cached runtime rewrite the shared ~/.codex/models_cache.json with a reduced model list.
Additional information
Workaround that fully resolved it for me:
- Quit the app.
- Rename the stale runtime dir and the poisoned cache:
%LOCALAPPDATA%\OpenAI\Codex\bin\38dff8711e296435 → *.bak, ~/.codex/models_cache.json → *.bak
- Relaunch. The app-server then ran from the packaged 0.144.0 binary (
C:\Program Files\WindowsApps\OpenAI.Codex_26.707.3748.0_...\app\resources\codex.exe), the cache regenerated withclient_version: 0.144.0and allgpt-5.6-*slugs, andgpt-5.6-solworked again in the app — including in the previously failing conversation.
Related: #31826 (same error on latest version, no cause identified), #31869 (same error on up-to-date Linux CLI; macOS fine — consistent with a poisoned local cache/state rather than the binary), #30270 (stale versioned-path pattern for plugins), #20821 (older Windows-app variant with gpt-5.5).
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗