AI how-to notes · 2026-09-17 · last run 2026-09-17 · 한국어 원문
Checking and updating the Codex CLI version — npm update did not get from 0.153 to 0.154
One line summary
codex --version gives you the version you have; npm view @openai/codex version gives you the latest. To move up, install with @latest attached. We installed 0.153.0 in a temp folder and ran npm update, which only climbed to 0.153.4, while installing @latest went to 0.154.0.
Who this is for
- Anyone unsure whether their codex is current
- Anyone who ran
npm updateand didn't get the version bump they expected - Anyone wondering whether a
codex updatecommand exists
Test environment
| Item | Value |
|---|---|
| OS | Windows 11 Home (10.0.26200) |
| Shell | Git Bash |
| node / npm | v24.19.0 / 11.17.0 |
| codex installed | codex-cli 0.153.4 (global, C:\Users\User\AppData\Roaming\npm) |
npm latest | 0.154.0 |
| Method | Installed into temp folders with npm install --prefix. The global codex was left alone |
1. Check the version you have and where it lives
codex --version
npm ls -g @openai/codexcodex-cli 0.153.4
C:\Users\User\AppData\Roaming\npm
`-- @openai/codex@0.153.4codex --version prints the version after codex-cli. npm ls -g goes further and shows which global folder holds which version. On Windows, where.exe codex returned two entries from the same folder, codex and codex.cmd.
2. Check the latest version
The package name is @openai/codex.
npm view @openai/codex name version dist-tags --json{
"name": "@openai/codex",
"version": "0.154.0",
"dist-tags": {
...
"latest": "0.154.0",
...
"alpha": "0.155.0-alpha.16",
...
}
}(The middle is trimmed. The original has more platform-specific tags.)
npm view @openai/codex versions returned 4,547 entries that day, 186 of them in plain x.y.z form. The tail of the list continued with alpha and platform-specific versions. The recent ones look like this.
0.152.0 0.152.1 0.153.0 0.153.1 0.153.2 0.153.3 0.153.4 0.154.0codex will also tell you about a new version itself. The top of codex doctor --summary had this line.
[up] updates 0.154.0 available (current 0.153.4)3. Reproducing the update in a temp folder
To avoid touching the global codex, we deliberately installed the older 0.153.0 under %TEMP%\longtail_B.
npm install --prefix "C:\Users\User\AppData\Local\Temp\longtail_B\prefix" @openai/codex@0.153.0
npm outdated --prefix "C:\Users\User\AppData\Local\Temp\longtail_B\prefix"Package Current Wanted Latest Location Depended by
@openai/codex 0.153.0 0.153.4 0.154.0 node_modules/@openai/codex prefixWanted and Latest differ. The package.json in a second folder made the same way recorded "^0.153.0". npm treats 0.153.4 as the target (Wanted) for that range, and leaves 0.154.0 outside it.
We actually ran npm update in that second temp folder.
npm update --prefix "...\longtail_B\prefix2"
npm ls --prefix "...\longtail_B\prefix2"changed 2 packages, and audited 3 packages in 7s
...
`-- @openai/codex@0.153.4Running npm update in the folder carrying "^0.153.0" installed 0.153.4, and the runtime confirmed codex-cli 0.153.4. It never reached the latest, 0.154.0.
In the first folder we reinstalled with @latest attached.
npm install --prefix "...\longtail_B\prefix" @openai/codex@latestchanged 2 packages, and audited 3 packages in 8s
found 0 vulnerabilities`-- @openai/codex@0.154.0
codex-cli 0.154.0package.json changed to "^0.154.0", and a second npm outdated printed nothing at all.
If you use the global install, the same idea gives you the command below. We did not run it this round.
npm install -g @openai/codex@latest4. The codex update command
The codex --help list has this line.
update Update Codex to the latest versioncodex update --help shows only the common -c, --enable, --disable and -h options, with nothing about what it changes or how. Because it could touch the global install, we did not run it.
Results
| Step | What we did | Resulting version |
|---|---|---|
| 1 | Global codex --version | 0.153.4 |
| 2 | Installed @openai/codex@0.153.0 in a temp folder | 0.153.0 |
| 3 | Installed @openai/codex@latest in the first temp folder | 0.154.0 |
| 4 | npm update in the second temp folder (0.153.0) | 0.153.4 |
| 5 | Global codex --version afterwards | 0.153.4 (unchanged) |
Each install took 7–8 seconds. We deleted the longtail_B temp folder at the end.
What failed
npm updatecould not get us to 0.154.0. That isn't an error — it climbed to theWantedversion (0.153.4) thatnpm outdatedhad shown.npm outdatedexits with code 1 when there is something to upgrade. In a script, that can read as a failure.
What we did not test
- What
codex updateactually does when run (what it installs, whether it calls npm) — we did not check. - We did not run the global
npm install -g @openai/codex@latest. We did not measure problems like global folder permissions or a running codex binary being locked. - We did not capture the first temp folder's
package.jsonright after installation. The"^0.153.0"value comes from the second folder, made with the same command. - We did not check alpha installs, or macOS and Linux. In Command Prompt (cmd.exe) we only looked at version output from the temp install; installing or updating from cmd.exe went unchecked.
- We did not check where
codex doctorlearns about new versions from.