Update loop

Resolved 💬 4 comments Opened Feb 18, 2026 by Jozko25 Closed Feb 18, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

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)

  1. Skip
  2. Skip until next version

Press enter to continue

What is the expected behavior?

it's expected to update

Additional information

_No response_

View original on GitHub ↗

4 Comments

FacundoLucci · 6 months ago

Also experiencing this. Going from 0.63.0 -> 0.104.0
EDIT Was using pnpm.

type -a codex

codex is /Users/facundo/.volta/bin/codex
codex is /Users/facundo/Library/pnpm/codex

Removed the version installed by pnpm. Worked

etraut-openai contributor · 6 months ago

@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 codex may help you figure it out.

Jozko25 · 6 months ago

fixed this by uninstalling by brew and normally, restarting the machine and installing again. thanks tho.

MongLong0214 · 28 days ago

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 codex executable that launched it.

Environment:

macOS arm64
node v24.18.0
npm 11.16.0
active old Codex: codex-cli 0.144.6
newly installed Codex: codex-cli 0.146.0

In an interactive zsh (the terminal happened to be embedded in WebStorm):

$ type -a codex
codex is ~/.local/bin/codex
codex is ~/.nvm/versions/node/v24.18.0/bin/codex

$ ls -l ~/.local/bin/codex
~/.local/bin/codex -> ~/.nvm/versions/node/v24.13.0/bin/codex

$ ~/.local/bin/codex --version
codex-cli 0.144.6

$ ~/.nvm/versions/node/v24.18.0/bin/codex --version
codex-cli 0.146.0

$ npm config get prefix
~/.nvm/versions/node/v24.18.0

So codex launches 0.144.6 through a stale symlink earlier in PATH, while the built-in updater runs:

npm install -g @openai/codex

That command successfully updates the current nvm prefix (Node 24.18.0), then reports:

🎉 Update ran successfully! Please restart Codex.

On restart, PATH still 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/codex symlink so the updated nvm binary is first in PATH.