Client or integration
Codex CLI
Area
Installation or packaging
Summary
When codex is installed by a version manager (mise, asdf, volta, and similar layouts), upgrading it overwrites the opencodex autostart shim and the codex.opencodex-real backup the shim depends on. Nothing detects or repairs this on the next ocx start / ocx ensure, and routing silently reverts to native — producing the misleading symptom reported in #2411.
Reproduction
-
Install codex through a version manager so the binary lives under its install tree, e.g. mise at ~/.local/share/mise/installs/codex/latest/bin/codex.
-
Install the opencodex autostart shim:
-
Upgrade codex through the version manager (this replaces the binary in place):
-
Inspect the shim:
Codex autostart shim: wrapper present but not an opencodex shim at
/home/<user>/.local/share/mise/installs/codex/latest/bin/codex;
original backup missing at
/home/<user>/.local/share/mise/installs/codex/latest/bin/codex.opencodex-real.
-
Note that neither ocx start nor ocx ensure repairs or reports it, and that ocx service repair reports success while leaving the condition in place:
ocx service repair
# ✅ opencodex service repaired and serving on port 10100.
ocx doctor | grep -A2 'Codex restart safety'
# !! AT RISK after restart (installed service is disabled, stopped, or unhealthy; run 'ocx service repair')
# routing=opencodex-local, service=installed-but-unhealthy, shim=stale
-
Timestamps confirm the sequence:
stat -c '%y %n' ~/.local/share/mise/installs/codex/latest/bin/codex
# 2026-08-20 22:23:45 (version-manager upgrade to 0.149.0)
stat -c '%y %n' ~/.codex/config.toml
# 2026-08-21 21:50:57 (no openai_base_url present)
Expected: the stale shim is detected and either repaired or reported prominently, rather than silently leaving routing native.
Actual: it is only visible via ocx codex-shim status or ocx doctor; ocx status stays green and routing quietly reverts.
Version
opencodex 2.29.0
Operating system
Ubuntu 24.04.4 LTS (WSL2, kernel 6.18.33.2-microsoft-standard-WSL2); codex-cli 0.149.0 installed via mise
Provider and model
Not model-specific — affects every routed model once the shim is stale.
Logs or error output
$ ocx codex-shim status
Codex autostart shim: wrapper present but not an opencodex shim at
/home/<user>/.local/share/mise/installs/codex/latest/bin/codex;
original backup missing at
/home/<user>/.local/share/mise/installs/codex/latest/bin/codex.opencodex-real.
$ ocx doctor | grep -A2 'Codex restart safety'
Codex restart safety
!! AT RISK after restart (installed service is disabled, stopped, or unhealthy; run 'ocx service repair')
routing=opencodex-local, service=installed-but-unhealthy, shim=stale
Why it is awkward to fix locally: the shim replaces the codex binary in place, but under a version manager that binary is owned by the version manager and will be overwritten again on the next upgrade. Reinstalling the shim also cannot restore .opencodex-real, since the original was already overwritten.
Suggestions: (1) report the stale-shim condition in ocx status, not only in codex-shim status / doctor; (2) self-heal on ocx start / ocx ensure where safe, or fall back cleanly and say which; (3) document the version-manager interaction — for version-manager-owned codex, the openai_base_url config route alone may be the supported path, since the shim and the version manager contend for the same file.
Related: #2411 is the user-visible symptom this produces.
Client or integration
Codex CLI
Area
Installation or packaging
Summary
When
codexis installed by a version manager (mise, asdf, volta, and similar layouts), upgrading it overwrites the opencodex autostart shim and thecodex.opencodex-realbackup the shim depends on. Nothing detects or repairs this on the nextocx start/ocx ensure, and routing silently reverts to native — producing the misleading symptom reported in #2411.Reproduction
Install
codexthrough a version manager so the binary lives under its install tree, e.g. mise at~/.local/share/mise/installs/codex/latest/bin/codex.Install the opencodex autostart shim:
Upgrade
codexthrough the version manager (this replaces the binary in place):Inspect the shim:
Note that neither
ocx startnorocx ensurerepairs or reports it, and thatocx service repairreports success while leaving the condition in place:Timestamps confirm the sequence:
Expected: the stale shim is detected and either repaired or reported prominently, rather than silently leaving routing native.
Actual: it is only visible via
ocx codex-shim statusorocx doctor;ocx statusstays green and routing quietly reverts.Version
opencodex 2.29.0
Operating system
Ubuntu 24.04.4 LTS (WSL2, kernel 6.18.33.2-microsoft-standard-WSL2); codex-cli 0.149.0 installed via mise
Provider and model
Not model-specific — affects every routed model once the shim is stale.
Logs or error output
Why it is awkward to fix locally: the shim replaces the
codexbinary in place, but under a version manager that binary is owned by the version manager and will be overwritten again on the next upgrade. Reinstalling the shim also cannot restore.opencodex-real, since the original was already overwritten.Suggestions: (1) report the stale-shim condition in
ocx status, not only incodex-shim status/doctor; (2) self-heal onocx start/ocx ensurewhere safe, or fall back cleanly and say which; (3) document the version-manager interaction — for version-manager-ownedcodex, theopenai_base_urlconfig route alone may be the supported path, since the shim and the version manager contend for the same file.Related: #2411 is the user-visible symptom this produces.