codex - 💡(How to fix) Fix Windows global npm update can leave codex-win32-x64 stale after @openai/codex update [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19824Fetched 2026-04-28 06:36:27
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Error Message

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

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

After the problematic update, codex --version still returned:

ext codex-cli 0.124.0

The main npm package was already updated to @openai/[email protected].

What subscription do you have?

ChatGPT Pro

Which model were you using?

N/A - install/update issue before normal use.

What platform is your computer?

Windows x64

ext Microsoft Windows NT 10.0.26200.0 Node.js v22.13.0 npm 11.10.0 PowerShell npm global prefix: C:\usr\local

What issue are you seeing?

Updating Codex globally with npm can report success while leaving the native Windows platform package stale or partially replaced.

In this case, after updating to @openai/[email protected], the JS wrapper package was updated but the native package used by the wrapper was still effectively 0.124.0, so running codex --version continued to report codex-cli 0.124.0.

Observed state during investigation:

` ext C:\usr\local\node_modules@openai\codex\package.json version: 0.125.0

C:\usr\local\node_modules@openai\codex-win32-x64\package.json version: 0.124.0-win32-x64

codex --version codex-cli 0.124.0 `

A later direct reinstall attempt of the platform alias also left the global install in an incomplete/staging state for a while:

ext C:\usr\local\node_modules\@openai\.codex-win32-x64-ZLHIbqty C:\usr\local\node_modules\@openai\codex-win32-x64

At one point the target package existed but codex failed with:

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

The

extent analysis

TL;DR

Reinstalling the Codex CLI using npm install -g @openai/codex@latest may resolve the version mismatch issue.

Guidance

  • Verify the versions of the JS wrapper package and the native package using npm ls @openai/codex and checking the package.json files in the respective directories.
  • Check for any incomplete or staging installations by looking for temporary directories like C:\usr\local\node_modules\@openai\.codex-win32-x64-ZLHIbqty.
  • Try reinstalling the platform alias directly using npm install -g @openai/codex-win32-x64@latest to ensure the native package is updated.
  • If the issue persists, attempt a complete removal of the Codex CLI using npm uninstall -g @openai/codex followed by a fresh installation using npm install -g @openai/codex@latest.

Notes

The issue seems to be related to the native Windows package not being updated correctly, leaving the installation in an incomplete state. The provided steps aim to address this by ensuring the native package is updated and the installation is complete.

Recommendation

Apply workaround: Reinstall the Codex CLI using npm install -g @openai/codex@latest to resolve the version mismatch issue, as the root cause appears to be related to the installation process rather than a specific version defect.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Windows global npm update can leave codex-win32-x64 stale after @openai/codex update [1 comments, 2 participants]