codex - 💡(How to fix) Fix codex update uses standalone install.sh path instead of detecting npm-managed install

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…

Error Message

Running:

Root Cause

This creates a misleading mixed-install state and makes it unclear whether the user should use:

  • codex update
  • npm install -g @openai/codex@latest
  • install.sh / standalone updater

It also relates to #24034, where codex remote-control start used a stale standalone app-server even after the shell CLI had been upgraded via npm.

Code Example

codex update

---

sh -c 'curl -fsSL https://chatgpt.com/codex/install.sh | sh'

---

Could not find SHA-256 digest for codex-package-x86_64-unknown-linux-musl.tar.gz in codex-package_SHA256SUMS.
Error: `sh -c 'curl -fsSL https://chatgpt.com/codex/install.sh | sh'` failed with status exit status: 1

---

/root/.codex/packages/standalone/releases/0.132.0-x86_64-unknown-linux-musl/codex

---

npm install -g @openai/codex@0.133.0

---

/root/.local/lib/node_modules/@openai/codex/bin/codex.js

---

codex --version

---

codex-cli 0.133.0

---

npm i -g @openai/codex@latest
RAW_BUFFERClick to expand / collapse

Environment

  • OS: Ubuntu 22.04.5 LTS
  • Codex before update: codex-cli 0.132.0
  • Codex after npm reinstall: codex-cli 0.133.0
  • npm package: @openai/[email protected]

Related issue: #24034

Observed behavior

Running:

codex update

attempted to update Codex via:

sh -c 'curl -fsSL https://chatgpt.com/codex/install.sh | sh'

The update then failed with:

Could not find SHA-256 digest for codex-package-x86_64-unknown-linux-musl.tar.gz in codex-package_SHA256SUMS.
Error: `sh -c 'curl -fsSL https://chatgpt.com/codex/install.sh | sh'` failed with status exit status: 1

Before reinstalling with npm, the active Codex command resolved to:

/root/.codex/packages/standalone/releases/0.132.0-x86_64-unknown-linux-musl/codex

After running:

npm install -g @openai/[email protected]

the same command resolved to:

/root/.local/lib/node_modules/@openai/codex/bin/codex.js

and:

codex --version

reported:

codex-cli 0.133.0

Expected behavior

If the active Codex installation is npm-managed, Codex should either:

  1. use npm-compatible update guidance, for example:

    npm i -g @openai/codex@latest
  2. refuse self-update with a clear message explaining that this install should be updated through npm

  3. clearly state that the currently executing binary is standalone-managed, if that is the case

Actual problem

The update path was confusing because /root/.local/bin/codex stayed the visible command path, but the resolved target changed from a standalone binary to the npm package after reinstall. From the user perspective, Codex appeared npm-installed/managed, but codex update used the standalone install.sh path.

Why this matters

This creates a misleading mixed-install state and makes it unclear whether the user should use:

  • codex update
  • npm install -g @openai/codex@latest
  • install.sh / standalone updater

It also relates to #24034, where codex remote-control start used a stale standalone app-server even after the shell CLI had been upgraded via npm.

Suggested fix

Improve install-method detection and messaging:

  • detect npm-managed installs and recommend npm update
  • detect standalone installs and say explicitly that the standalone updater is being used
  • avoid silently using install.sh when the visible command path is a wrapper/symlink under ~/.local/bin
  • include resolved executable path and install method in the update output

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…

FAQ

Expected behavior

If the active Codex installation is npm-managed, Codex should either:

  1. use npm-compatible update guidance, for example:

    npm i -g @openai/codex@latest
  2. refuse self-update with a clear message explaining that this install should be updated through npm

  3. clearly state that the currently executing binary is standalone-managed, if that is the case

Still need to ship something?

×6

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

Back to top recommendations

TRENDING