t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Codex Update Always Failing

Open DommyMM opened this issue 6 months ago • 8 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] 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) Image 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

image.png

Workaround

Manually typing the npm install ig?

DommyMM avatar May 19 '26 21:05 DommyMM

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.

Haplois avatar May 20 '26 04:05 Haplois

Same issue on OSX for me

niallobrien avatar May 22 '26 08:05 niallobrien

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

michft avatar May 25 '26 10:05 michft

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

jordanbailey00 avatar Jun 04 '26 01:06 jordanbailey00

I investigated this against the current provider-maintenance path. Modern Codex releases can avoid the package-manager spawn entirely: codex update was 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.

Destreyf avatar Jul 16 '26 22:07 Destreyf

The corresponding implementation is now open as #4065: https://github.com/pingdotgg/t3code/pull/4065

Destreyf avatar Jul 16 '26 22:07 Destreyf

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.

Destreyf avatar Jul 16 '26 22:07 Destreyf

Closing as fixed by merged PR #2751, which resolves the Windows spawn npm ENOENT update path. PR #4065 is separate follow-up work for version-aware/native Codex updates.

juliusmarminge avatar Jul 20 '26 14:07 juliusmarminge