You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows global npm update can leave codex-win32-x64 stale after @openai/codex update #19824
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.
I reproduced the destructive variant of this on Windows with the current 0.154.0 release. This is more than a stale-binary/cleanup warning: the updater reported success while leaving the CLI unable to start.
This connects the Windows executable-lock behavior in #21872/#23320 with npm's silent optional-dependency failure in #41283. run_update_action waits for npm install -g @openai/codex while the native Windows executable being replaced is still alive. Windows locks that executable; npm can suppress the platform-package failure because it is an optionalDependency, then Codex treats npm's exit code 0 as a successful update.
Suggested fix direction:
Do not run npm/pnpm/bun self-update synchronously from the active native Codex process on Windows. Exit first and hand the update to a detached helper that waits for the old process to release the executable (or, as a minimal safe fallback, tell the user to run the command after exiting).
Before printing Update ran successfully, launch the newly installed codex --version through the resolved global shim and require success.
Independently harden the npm package installation path so absence of the current platform package cannot produce a successful install (for example, a post-install platform-binary verification or a packaging design where the selected binary is required rather than optional).
The official standalone Windows installer already avoids this class of failure by installing into a versioned release directory, validating the package contents/version, and only then switching the current junction. Migrating the Windows update action to that installer may be the cleanest long-term fix.
Activity
github-actions commentedon Apr 27, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
FSudong commentedon Sep 13, 2026
I reproduced the destructive variant of this on Windows with the current
0.154.0release. This is more than a stale-binary/cleanup warning: the updater reported success while leaving the CLI unable to start.Environment:
Windows_NT 10.0.26200)v24.15.011.12.1@openai/[email protected]omit=optionalconfiguration; registry ishttps://registry.npmjs.org/The update was run from an active Codex process. The npm debug log shows this sequence:
After that successful exit, the installed tree contained
@openai/[email protected]but no@openai/codex-win32-x64. Every launch failed with:This connects the Windows executable-lock behavior in #21872/#23320 with npm's silent optional-dependency failure in #41283.
run_update_actionwaits fornpm install -g @openai/codexwhile the native Windows executable being replaced is still alive. Windows locks that executable; npm can suppress the platform-package failure because it is anoptionalDependency, then Codex treats npm's exit code 0 as a successful update.Suggested fix direction:
Update ran successfully, launch the newly installedcodex --versionthrough the resolved global shim and require success.The official standalone Windows installer already avoids this class of failure by installing into a versioned release directory, validating the package contents/version, and only then switching the
currentjunction. Migrating the Windows update action to that installer may be the cleanest long-term fix.