Bug: Missing optional dependency @openai/codex-win32-x64 on Windows (v0.124)

Open 💬 6 comments Opened Apr 24, 2026 by asdfqwerzxcc
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.124.0

What subscription do you have?

pro

Which model were you using?

_No response_

What platform is your computer?

OS: Windows 10 x64 Node.js: (e.g. v20.12.2) npm: (e.g. v10.5.0) Codex version: 0.124.0

What terminal emulator and version are you using (if applicable)?

_No response_

What issue are you seeing?

After installing @openai/codex@0.124.0 globally, running codex results in the following error:

Error: Missing optional dependency @openai/codex-win32-x64.
Reinstall Codex: npm install -g @openai/codex@latest

What steps can reproduce the bug?

Install Codex:

npm install -g @openai/codex@0.124.0

Run:

codex

What is the expected behavior?

Codex CLI should run normally.

Additional information

npm config get omit returns: (your value)
NODE_ENV: (your value)

Installing @openai/codex-win32-x64 directly results in:

404 Not Found
Version 0.122.x works correctly on the same environment.
Suspected Cause

It seems that the Windows-specific optional dependency (*-win32-x64) may not be properly published or resolved for version 0.124.0.

View original on GitHub ↗

6 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #17432
  • #19177
  • #18648

Powered by Codex Action

yujianfeikong · 2 months ago

I also encountered the same issue:
Error: Missing optional dependency @openai/codex-darwin-x64. Reinstall Codex: npm install -g @openai/codex@latest

But version 0.123.0 is normal

imdoge · 2 months ago
npm view @openai/codex@0.123.0-win32-x64 version
npm warn Unknown project config "public-hoist-pattern". This will stop working in the next major version of npm.
0.123.0-win32-x64
npmview @openai/codex@0.124.0-win32-x64 version
npm warn Unknown project config "public-hoist-pattern". This will stop working in the next major version of npm.
npm error code E404
npm error 404 No match found for version 0.124.0-win32-x64
npm error 404
npm error 404  The requested resource '@openai/codex@0.124.0-win32-x64' could not be found or you do not have permission to access it.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in
KISS-GG · 2 months ago

same error.
use node24.
but node22 is all ok.

davidchen27 · 2 months ago

I encountered the same problem, also with version 0.124.0. However, the difference is that I used volta install @openai/codex and my Node.js version was 25.6.0. Version 0.123.0 did not have this problem.

FelixWardUS · 2 months ago

I hit this kind of Codex npm install/update problem a few times too, so I made a small pre-check tool:

https://github.com/FelixWardUS/codex-npm-check

You can try it before updating:

npm install -g codex-npm-check
cnc

It checks whether the Codex npm release and its platform packages are actually available before install. It only catches npm publishing/registry problems, not runtime bugs after install.