Repository navigation
Description
What version of Codex CLI is running?
0.161.0. Note this version now installs correctly. The issue is the ~12 minute window after the wrapper was published and before the linux-x64 binary existed.
What subscription do you have?
ChatGPT auth (per codex doctor).
Which model were you using?
N/A - the failure occurs at process startup, before any model is used.
What platform is your computer?
Linux 7.0.0-38-generic x86_64 unknown
What terminal emulator and version are you using (if applicable)?
N/A, reproduced from a plain shell.
Codex doctor report
not available for the failing install - codex exited before startup, so no report could be generated. Report from the working 0.161.0 install (relevant sections, rest omitted):
{
"codexVersion": "0.161.0",
"checks": {
"installation": {
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "/home/ashwin/.local/bin/codex",
"managed by npm": "true",
"managed package root": "/home/ashwin/.local/lib/node_modules/@openai/codex",
"install context": "npm (package /home/ashwin/.local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /home/ashwin/.local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /home/ashwin/.local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /home/ashwin/.local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)"
}
},
"runtime.provenance": {
"status": "ok",
"summary": "running npm on linux-x86_64",
"details": {
"platform": "linux-x86_64",
"version": "0.161.0",
"install method": "npm (package /home/ashwin/.local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /home/ashwin/.local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /home/ashwin/.local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /home/ashwin/.local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)",
"current executable": "/home/ashwin/.local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex"
}
},
"updates.status": {
"status": "ok",
"summary": "update configuration is locally consistent",
"details": {
"latest version": "0.161.0",
"latest version status": "current version is not older",
"update action": "npm install -g @openai/codex"
}
}
}
}What issue are you seeing?
Between 2026-10-07T16:04:02Z and 16:16:36Z, npm install -g @openai/codex@latest on Linux x64 produced a non-functional install.
The wrapper @openai/[email protected] was published at 16:04:02Z. Its platform packages were published afterwards, linux-x64 last:
$ npm view @openai/codex time --json
0.161.0 2026-10-07T16:04:02.844Z
0.161.0-darwin-x64 2026-10-07T16:05:34.324Z
0.161.0-linux-arm64 2026-10-07T16:06:18.657Z
0.161.0-linux-x64 2026-10-07T16:16:36.077Z <-- ~12.5 min after the wrapper
So for roughly 12 minutes latest resolved to a version whose linux-x64 artifact was not yet on the registry, and a direct lookup 404'd:
$ npm view @openai/[email protected] version
npm error code E404
npm error 404 No match found for version 0.161.0-linux-x64
The platform packages are declared as aliased optionalDependencies, so npm treated the absent artifact as acceptable and dropped it from the tree. Install exited 0 with a success summary and left a working codex symlink. The failure surfaced only on first run:
file:///home/ashwin/.local/lib/node_modules/@openai/codex/bin/codex.js:107
throw new Error(
^
Error: Missing optional dependency @openai/codex-linux-x64. Reinstall Codex: npm install -g @openai/codex@latest
The remedy the error suggests cannot work during the window, because latest is the broken version. Re-running it fails again for as long as the window lasts.
Ruled out as local configuration: npm config get omit empty, optional null, os null, cpu null, registry https://registry.npmjs.org/, no ~/.npmrc, ignore-scripts = false.
What steps can reproduce the bug?
The window has closed, so this is not reproducible against 0.161.0 directly. The underlying flaw is deterministic and still reproducible, since it is npm's handling of the optional dep rather than a transient registry state:
# Prunes every optionalDependency, including the platform binary.
# npm still exits 0 and installs the wrapper.
npm install -g @openai/codex@latest --omit=optional
# Install looks successful; the failure is deferred to first run.
codex --version
# Error: Missing optional dependency @openai/codex-linux-x64The publish-ordering timeline above is what actually triggered the user-facing report.
What is the expected behavior?
Either latest should not move until every platform artifact is published, or a missing platform binary should fail the install loudly instead of silently. Because the platform packages are optionalDependencies, npm cannot distinguish "platform intentionally unsupported" from "artifact not published yet", so an install inside a publishing gap is indistinguishable from a successful one.
Additional information
Confirmed resolved. After 16:16:36Z, npm install -g @openai/codex@latest resolved normally and codex --version reports codex-cli 0.161.0, with the platform package present at .../node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/.
Prior reports of the same symptom, plausibly the same cause:
| Version | Issue |
|---|---|
| 0.124.0 | #19177 |
| 0.125.0 | #19419 |
| 0.134.0 | #24672 |
| 0.150.1 | #41283 (silent-failure variant, ECONNRESET during tarball fetch) |
| 0.157.0 | #47990 (most detailed prior report, identical error string) |
| 0.161.0 | this issue |
Per the issue template, flagging that #47990 describes the same failure. If this is a duplicate, please merge rather than close - the publish-ordering timeline and the fact that only linux-x64 lagged are new information.
Suggested fixes
- Publish all platform artifacts first, then move the
latestdist-tag as a final step. This alone would prevent every occurrence above. - Add a postinstall resolution check, or a preflight in the launcher, so a missing platform binary surfaces at install time rather than on first run.
Activity
zzhang82 commentedon Oct 8, 2026
This happened again with
0.162.0on Linux x64 on October 8.npm install -g @openai/codexcompleted, butcodex --versionfailed:The install log at 19:03 UTC showed:
Retrying with
--include=optional --prefer-onlinehit the same 404. Installing@openai/[email protected]restored startup.By 19:12 UTC, a HEAD request to the same tarball URL returned 200. I have not retried the 0.162.0 install since then.
Please keep
lateston the previous release until all referenced platform tarballs are downloadable.coygeek commentedon Oct 15, 2026
Hit this again with
0.163.0on macOS arm64 (Darwin 27.0.0, Node v26.10.0, npm 12.2.0) on October 15.npm
timefor the release shows the wrapper published about 5 minutes before the darwin-arm64 binary:npm install --global @openai/codex@latestran at 21:43:20Z, about 73 seconds after the darwin-arm64 publish, and still got a 404 for the tarball:codexthen failed withMissing optional dependency @openai/codex-darwin-arm64. The same URL returned 200 at 21:46Z, and reinstalling fixed it.So the window is not only "binary not yet published": it also includes a short period after publish while the tarball is still 404 on the registry CDN. Publishing every platform package and waiting until each tarball URL returns 200 before publishing the wrapper (or moving the
latesttag) would close both gaps.JinJieBeWater commentedon Nov 18, 2026
Note
🤖 GPT-6.2-Astra responding on behalf of JinJieBeWater
Codex CLI 0.170.0 hit the same startup failure on macOS arm64 with Bun 1.4.4 on November 18. The macOS package was submitted first, but the npm registry timestamp for the CLI wrapper precedes the macOS package by 4 minutes 57 seconds. All times below are UTC.
npm publishreported success in CItimeThe global update started at 03:50:58, about 15 seconds after the macOS registry timestamp. Bun installed the wrapper. Its entry in
bun.lockdeclared all six optional platform dependencies, but none had a resolved entry. Runningcodex --versionfailed withMissing optional dependency @openai/codex-darwin-arm64. The original HTTP response wasn't captured, so the local evidence can't distinguish stale metadata from a failed tarball fetch.Could the release job keep
lateston the previous version until each new platform version resolves and its tarball can be fetched from the public registry? Release job