Skip to content

[Bug]: Codex Update Always Failing #2765

Description

@DommyMM

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)
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?

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on May 19, 2026
  2. Haplois commented on May 20, 2026

    @Haplois

    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.

  3. niallobrien commented on May 22, 2026

    @niallobrien

    Same issue on OSX for me

  4. michft commented on May 25, 2026

    @michft

    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

  5. jordanbailey00 commented on Jun 4, 2026

    @jordanbailey00

    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

  6. Destreyf commented on Jul 16, 2026

    @Destreyf

    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.

  7. Destreyf commented on Jul 16, 2026

    @Destreyf

    The corresponding implementation is now open as #4065: #4065

  8. Destreyf commented on Jul 16, 2026

    @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.

  9. juliusmarminge commented on Jul 20, 2026

    @juliusmarminge
    Member

    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.

  10. removed
    needs-triageIssue needs maintainer review and initial categorization.
    on Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions