[Bug]: Codex Update Always Failing #2765
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/desktop
Steps to reproduce#
Open the app, click update when it detects a newer codex version
Expected behavior#
Like Claude Code, it just runs it and updates and tells me I'm gucci
Actual behavior#
Failed to run update command npm: NotFound: ChildProcess.spawn (npm install -g @openai/codex@latest)
Seems to always happen on both my thinkpad and desktop (both W11), but me manually typing the command works
Impact#
Major degradation or frequent failure
Version or commit#
No response
Environment#
Windows11
Logs or stack traces#
Screenshots, recordings, or supporting files#
Workaround#
Manually typing the npm install ig?
DommyMM(GitHub profile, opens in a new tab) added labelsbug
DommyMM(GitHub profile, opens in a new tab) added labelsneeds-triage
Same issue on OSX for me
That for me is the CLI versions need updating. in MacOs I can Update the Codex App but unless I do a 'brew update; brew upgrade codex' I continue to get that error. Updating the codex app does not seem to effect the codex CLI
Make sure you don't have a stale copy of codex on your machine. T3 might be calling the stale copy instead of the correct updated copy
I investigated this against the current provider-maintenance path. Modern Codex releases can avoid the package-manager spawn entirely:
codex updatewas added upstream in openai/codex#19933 and first appeared in the stable npm line in 0.128.0.I have a focused change ready that:
- uses structured
codex+["update"]execution for valid installed versions >= 0.128.0; - retains the existing npm/pnpm/Bun/Vite+/Homebrew detection below that boundary or when the version is missing/malformed;
- keeps the selected capability shared between the version advisory and maintenance runner; and
- passes the configured provider-instance environment, including effective
CODEX_HOME, to the native update process.
I will link the corresponding PR here once the branch is pushed.
- uses structured
The corresponding implementation is now open as #4065: https://github.com/pingdotgg/t3code/pull/4065
Correction to my earlier comments: #2765 is specifically the Windows child-process/PATH failure and has its own Windows-focused work. The version-aware, cross-platform Codex capability change is now tracked separately in #4066, and PR #4065 has been updated to fix #4066 while listing this issue only as related context.
juliusmarminge removed labelsneeds-triage
juliusmarminge closed this
Sign in to join this conversation.
I have the same on Windows 11 issue too, manually running the update commands on a console also works for me.
This looks like b/c of missing environment variables (probably PATH) during process creation. Happy to do a quick PR if needed.