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:
16 Comments
Root cause found — this is not about missing release assets, it's a JSON formatting assumption in
install.sh.TL;DR:
api.github.comintermittently serves the release metadata as minified (single-line) JSON instead of pretty-printed, depending on whichbackend replica handles the request.
release_asset_digest_or_emptyininstall.shparses 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
curlinPATHto 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 withdigest||
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 withsha256:digests. Only the formattingdiffers.
Running the exact awk block from
release_asset_digest_or_emptyagainst both saved bodies:sha256:4efb871d40999…(found)release_asset_existsreturns false for every asset → the misleading error at the `Could not find Codex package or platform npmrelease assets` branch.
Suggested fix: make the digest lookup format-agnostic — e.g. use
jq -rwhen available with the awk as fallback, or normalize the JSON before theline-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.
confirm, same issue
$ curl -fsSL https://chatgpt.com/codex/install.sh | sh
Could not find Codex package or platform npm release assets for Codex 0.143.0.
Seems to be fixed now.
I had the same error this morning.
The bug is still there. But if you try long enough, like @icedfish said, you will eventually hit a replica with "good" json
I had to retry 10 times and then it worked. Maybe better to use the NPM API than the GitHub (limited) one?
You guys can fix by retry many times
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.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.
@Niek
Yeah right, definitely most of us in the thread were wrong (slow clap).
Yep, definitely worked by retrying 10~ times.
Finally worked on the 10th attempt
<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" />
You can use the just merged PR
Hey can we connect?