Update loop
What version of Codex CLI is running?
codex-cli 0.97.0
What subscription do you have?
API Based
Which model were you using?
gpt-5.2-codex
What platform is your computer?
Darwin 25.2.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
zsh
What issue are you seeing?
I am unable to update codex - when i run npm install -g @openai/codex - i get changed 2 packages in 343ms and when i open it again, the version is still the same.
What steps can reproduce the bug?
@Jans-MacBook-Pro ~ % codex --version
codex-cli 0.97.0
@Jans-MacBook-Pro ~ % codex
Updating Codex via npm install -g @openai/codex...
changed 2 packages in 346ms
🎉 Update ran successfully! Please restart Codex.
@Jans-MacBook-Pro ~ % codex --version
codex-cli 0.97.0
@Jans-MacBook-Pro ~ % - when i run it again getting this codex-cli 0.97.0
janharmady@Jans-MacBook-Pro ~ % codex
✨ Update available! 0.97.0 -> 0.104.0
Release notes: https://github.com/openai/codex/releases/latest
› 1. Update now (runs npm install -g @openai/codex)
- Skip
- Skip until next version
Press enter to continue
What is the expected behavior?
it's expected to update
Additional information
_No response_
4 Comments
Also experiencing this. Going from 0.63.0 -> 0.104.0
EDIT Was using pnpm.
Removed the version installed by pnpm. Worked
@Jozko25, this typically occurs when you have multiple copies of codex installed, perhaps one locally and one globally or one installed using pnpm or bun and another using npm. You'll need to find and remove the extra versions. Running
which codexmay help you figure it out.fixed this by uninstalling by brew and normally, restarting the machine and installing again. thanks tho.
I reproduced this update loop on macOS with zsh + nvm and found a concrete cause: the updater can update a different global npm installation than the
codexexecutable that launched it.Environment:
In an interactive zsh (the terminal happened to be embedded in WebStorm):
So
codexlaunches 0.144.6 through a stale symlink earlier inPATH, while the built-in updater runs:That command successfully updates the current nvm prefix (Node 24.18.0), then reports:
On restart,
PATHstill selects~/.local/bin/codex, which points to the old Node 24.13.0 installation, so the same update prompt repeats forever.Expected behavior: before reporting success, the updater should compare the executable that launched Codex (resolved through symlinks) with the binary installed under the active npm global prefix, then either verify that the launching executable's version changed or explain that another Codex installation shadows the updated one. Printing
command -v codex, the resolved executable, and the npm prefix in the error would make this straightforward to fix.Local workaround: remove or retarget the stale
~/.local/bin/codexsymlink so the updated nvm binary is first inPATH.