Linux x64 optional tarball 404 — 0.125.0 install leaves CLI broken (“Missing optional dependency @openai/codex-linux-x64”)
What version of Codex CLI is running?
0.125.0
What subscription do you have?
API
Which model were you using?
_No response_
What platform is your computer?
Linux (x86_64)
What terminal emulator and version are you using (if applicable)?
_No response_
What issue are you seeing?
codex throws:
Error: Missing optional dependency @openai/codex-linux-x64. Reinstall Codex: npm install -g @openai/codex@latest
After npm install -g @openai/codex@latest, the @openai/codex tree has no usable node_modules/@openai/codex-linux-x64 (or the optional install never completes).
Root cause (suspected)
npm view @openai/codex@0.125.0-linux-x64 reports a valid dist.tarball, but fetching that tarball returns HTTP 404, so npm cannot install the optional dependency. Example URL from metadata:
https://registry.npmjs.org/@openai/codex/-/codex-0.125.0-linux-x64.tgz
For comparison, the previous Linux x64 artifact (e.g. codex-0.124.0-linux-x64.tgz) returns 200, and npm install -g @openai/codex@0.124.0 works: node_modules/@openai/codex-linux-x64/vendor is present and codex -V succeeds.
Workaround
Pin until the 0.125.0-linux-x64 tarball is available on the registry:
npm install -g @openai/codex@0.124.0
Suggestions
- Fix or republish the
0.125.0-linux-x64(and any other platform) tarball so it matches npm metadata. - Consider surfacing failed optional dependency installs more clearly during
npm install -g(e.g. document checkingnpm ls -g @openai/codex/ tarball URL), since the current runtime error is easy to misread as a local install problem.
What steps can reproduce the bug?
Environment
- OS: Linux (x86_64)
- Node: v24.x (also reproducible with other supported Node versions)
- Install:
npm install -g @openai/codex@latest(resolves to@openai/codex@0.125.0)
Steps to reproduce
npm install -g @openai/codex@latestcodex
What is the expected behavior?
Expected
The CLI starts; optional platform package @openai/codex-linux-x64 (aliased to npm:@openai/codex@0.125.0-linux-x64) is present under the package’s node_modules, matching optionalDependencies in package.json.
Additional information
_No response_
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This is probably because of a timing issue related to uploading to npm. Please try again in a few minutes.
Having a similar issue with brew on Mac
I ran into this class of issue enough times that I made a tiny pre-check tool for it:
https://github.com/FelixWardUS/codex-npm-check
For this case, it checks whether both the main package and the Linux x64 variant have npm metadata and a reachable tarball before installing:
It is only meant to catch npm publishing/registry problems like missing platform builds or tarball 404s. It will not catch runtime bugs after the package installs.
This will be fixed in the next release, thanks to this PR. Actually, it will be completely fixed one release after next because part of the fix is in the client code. The next CLI release will include the fix so it can avoid this problem on the following update.