Bug: Codex CLI keeps prompting to update from 0.141.0 to 0.142.4 after a successful update
Environment
-
OS: Windows 11
-
Installation: Portable (Node.js + npm + Codex are all located under
C:\CodexDebug\node) -
Launcher:
.\node\codex.cmd
Problem
Every time I start Codex CLI, it reports:
Update available
0.141.0 -> 0.142.4
I choose Update, it reports success and asks me to restart Codex.
However, after restarting, the exact same update notification appears again.
This happens every time.
Investigation
1. npm reports that the latest package is already installed
Command:
.\node\npm.cmd list -g @openai/codex
Output:
@openai/codex@0.142.4
So npm confirms the latest version is already installed.
2. npm global prefix points to the portable installation
Command:
.\node\npm.cmd config get prefix
Output:
C:\CodexDebug\node
This confirms the update is installed into the portable directory rather than another global location.
3. codex.cmd launches the package from the same portable directory
Command:
Get-Content .\node\codex.cmd
The launcher executes:
node_modules\@openai\codex\bin\codex.js
Therefore the executable is using:
C:\CodexDebug\node\node_modules\@openai\codex
which is the same directory npm updated.
4. package.json also reports the latest version
Command:
Get-Content .\node\node_modules\@openai\codex\package.json | Select-String version
Output:
"version": "0.142.4"
So the installed package itself is definitely version 0.142.4.
5. But Codex CLI still reports itself as 0.141.0
Command:
.\node\codex.cmd --version
Output:
codex-cli 0.141.0
In addition, every launch still shows:
Update available
0.141.0 -> 0.142.4
Expected
After updating:
codex --versionshould report0.142.4- The update notification should disappear.
Actual
- npm package version is already
0.142.4. package.jsonis already0.142.4.codex.cmdlaunches the updated package.codex --versionstill reports0.141.0.- Every startup still prompts to update.
Conclusion
This appears to be an issue with the CLI’s version detection or update-check logic.
The installed package has already been updated successfully, but the CLI still believes it is running version 0.141.0, causing a false update notification on every launch.
It looks like the update checker and the installed package are reading different version sources.