Update command failed with "Could not find Codex package or platform npm release assets for Codex $resolved_version."

Resolved 💬 16 comments Opened Jul 8, 2026 by brlin-tw Closed Jul 9, 2026

What issue are you seeing?

When I tried to update my Codex CLI installation using the following command given in the cli:

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

the following error is emitted:

Could not find Codex package or platform npm release assets for Codex 0.143.0.

See also: install-codex.trace.01.txt.gz

What steps can reproduce the bug?

Run the following command:

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

What is the expected behavior?

No errors.

Additional information

OS: Ubuntu 26.04
Locale: zh_TW.UTF-8

Content warning: Vibe-debugging result below, feel free to ignore it.

I let Codex to troubleshoot the issue and it gives the following verdict:

• Root cause found: the trace’s GitHub response is minified onto one line. The old release_asset_digest_or_empty parser was line-oriented and assumed each asset’s "name" and "digest" appeared on separate lines. With minified JSON, it failed to recognize even though the assets were present, so select_install_asset printed the misleading “release metadata does not list installable assets yet” warning. I patched install-codex.sh:169 so the digest lookup scans the full JSON payload for the exact "name": "<asset>" property and then reads the following "digest" field. It now handles both pretty and minified GitHub API responses. Verified: - sh -n install-codex.sh passes. - Parser finds the package, checksum, and legacy npm digests from both pretty and minified 0.143.0 metadata. - Isolated installer run completes without the metadata warning. - Confirmed no new .bashrc PATH block was added during verification.

It generates the following patched script which I confirm resolves the problem at my end:

install-codex.patched.sh

View original on GitHub ↗

16 Comments

icedfish · 12 days ago

Root cause found — this is not about missing release assets, it's a JSON formatting assumption in install.sh.

TL;DR: api.github.com intermittently serves the release metadata as minified (single-line) JSON instead of pretty-printed, depending on which
backend replica handles the request. release_asset_digest_or_empty in install.sh parses that JSON with line-based awk that assumes one key per line,
so on the minified variant it finds no digest, and the installer misreports it as "Could not find Codex package or platform npm release assets".
Retrying is a lottery — that's why the failure looks random.

Evidence (macOS arm64, curl 8.x, no proxy; captured by shimming curl in PATH to save a copy of each response):

Two requests to https://api.github.com/repos/openai/codex/releases/latest, 26 seconds apart:

| | response A (installer succeeds) | response B (installer fails) |
|---|---|---|
| HTTP status | 200 | 200 |
| body size | 348,856 bytes | 296,905 bytes |
| lines | 5,888 (pretty-printed) | 1 (minified, no trailing newline) |
| assets | 162, all with digest | 162, all with digest |
| last-modified | Wed, 08 Jul 2026 01:32:35 GMT | same |
| x-github-request-id | E43A:102599:C330F8:29B1BAA:6A4DD381 | 8E60:AFEFE:1A132CF:58BD6FC:6A4DD385 |

Both bodies are semantically identical — parsed with Python json.load, both contain all 162 assets with sha256: digests. Only the formatting
differs.

Running the exact awk block from release_asset_digest_or_empty against both saved bodies:

  • response A → sha256:4efb871d40999… (found)
  • response B → empty → release_asset_exists returns false for every asset → the misleading error at the `Could not find Codex package or platform npm

release assets` branch.

Suggested fix: make the digest lookup format-agnostic — e.g. use jq -r when available with the awk as fallback, or normalize the JSON before the
line-based pass. It may also be worth splitting the error message: "asset not listed in release metadata" vs "digest not found in metadata", since
conflating them is what made this hard to diagnose.

Possibly related earlier reports of the same fragility: #28538, #28334, #27194.

jtac · 12 days ago

confirm, same issue

ducky-duke · 12 days ago

$ curl -fsSL https://chatgpt.com/codex/install.sh | sh
Could not find Codex package or platform npm release assets for Codex 0.143.0.

Utkarshnamdeo · 12 days ago

Seems to be fixed now.
I had the same error this morning.

below · 12 days ago

The bug is still there. But if you try long enough, like @icedfish said, you will eventually hit a replica with "good" json

Niek · 12 days ago

I had to retry 10 times and then it worked. Maybe better to use the NPM API than the GitHub (limited) one?

ducky-duke · 12 days ago

You guys can fix by retry many times

nrdvana · 12 days ago

The patched version didn't work for me. I get WARNING: Codex 0.143.0 release metadata does not list installable assets yet; waiting for GitHub to finish publishing them. and then it hangs.

lokingdav · 12 days ago
You guys can fix by retry many times

Ridiculous yet works. Thanks

nrdvana · 12 days ago
> You guys can fix by retry many times Ridiculous yet works. Thanks

I gave up before it worked. The easy solution was to ask ChatGPT to fix the install script to use 'jq' instead of 'awk'.

install.sh

Niek · 12 days ago
> > You guys can fix by retry many times > > > Ridiculous yet works. Thanks I gave up before it worked. The easy solution was to ask ChatGPT to fix the install script to use 'jq' instead of 'awk'. install.sh

Nice hallucination 😆 The issue is the GitHub API rate limiting, not whatever tool is used to parse the JSON response.

brlin-tw · 12 days ago

@Niek

Nice hallucination 😆 The issue is the GitHub API rate limiting, not whatever tool is used to parse the JSON response.

Yeah right, definitely most of us in the thread were wrong (slow clap).

MiguelChan · 11 days ago

Yep, definitely worked by retrying 10~ times.

mannubaveja007 · 11 days ago

Finally worked on the 10th attempt

Keep trying again and again to update things will start to work have some patience 

<img width="1336" height="317" alt="Image" src="https://github.com/user-attachments/assets/9d000fc5-1009-4bc2-946a-e108666e7c16" />

<img width="1307" height="214" alt="Image" src="https://github.com/user-attachments/assets/f162bdc9-8eb6-42e6-b061-bd3ef58ab66e" />

lindsayad · 11 days ago

You can use the just merged PR

curl -fsSL https://raw.githubusercontent.com/openai/codex/refs/heads/main/scripts/install/install.sh | sh
mannubaveja007 · 11 days ago
You can use the just merged PR `` curl -fsSL https://raw.githubusercontent.com/openai/codex/refs/heads/main/scripts/install/install.sh | sh ``

Hey can we connect?