Skip to main content
OpenAIintermediate

Fix "Could not find Codex package or platform npm release assets"

Fix "Could not find Codex package or platform npm release assets for Codex" when installing or updating Codex CLI. Causes: GitHub API rate limits and a stale install.sh.

8 min readUpdated August 2026

Installing or updating Codex CLI and hitting "Could not find Codex package or platform npm release assets for Codex"? The release almost certainly exists. This is the install script failing to read GitHub's release metadata, not a missing build.

The Error

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

The same message appears when running codex update, because that command fetches and runs the same hosted install script.

You can confirm the assets are present yourself: open the release page for the version named in the error and look for the platform archive matching your system, such as codex-package-x86_64-unknown-linux-musl.tar.gz. If it is listed — and it usually is — the installer is misreading metadata rather than encountering a genuinely incomplete release.


Why This Happens

Two distinct causes are documented, and they produce identical output.

1. Fragile release-metadata parsing. The install script identifies release assets by parsing the GitHub API's release JSON with a hand-rolled awk routine. That parser has been reported to mis-handle the deeply nested response, so it concludes no matching asset exists even when one does. A fix landed in the repository's own copy of the script while the copy served from the hosted endpoint remained the older version for a period — which is why codex update could keep failing after the bug was nominally fixed.

2. GitHub API rate limiting. The script queries the GitHub API unauthenticated. Anonymous requests are limited per IP address per hour. When that budget is exhausted, GitHub returns a rate-limit error document instead of release data, the parser finds no assets in it, and you get this exact message. This is why the error is so common on shared office networks, VPN exit points, CI runners and cloud VMs, where many machines share one outbound address — and why it often "fixes itself" an hour later.

Neither cause breaks an existing installation. If Codex is already installed it keeps working; you are simply stuck on your current version.


Fix 1: Install From npm Instead

The quickest resolution is to skip the install script altogether. The npm package delivers the same binary and does not touch GitHub release metadata:

npm install -g @openai/codex

To pin a specific version:

npm install -g @openai/codex@0.143.0

Verify:

codex --version

If npm itself fails with a permissions error, that is a separate problem — see npm EACCES permission denied installing Codex.


Advertisement

Fix 2: Authenticate the GitHub API Request

If you want to keep using the install script, raising the rate limit usually resolves it immediately. Set a token in your environment first — any GitHub personal access token with no special scopes is enough for reading public release metadata:

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

Check whether you are actually rate-limited before assuming anything:

curl -s https://api.github.com/rate_limit | grep -A3 '"core"'

A remaining value of 0 confirms the diagnosis, and reset gives the Unix timestamp when the window clears. If remaining is healthy, the parsing bug is the more likely cause and Fix 1 or Fix 3 is the better route.


Fix 3: Use Homebrew

On macOS and Linux, Homebrew is another path that avoids the script entirely:

brew install codex
codex --version

Homebrew installations do not auto-update, so remember to run brew upgrade codex periodically rather than relying on codex update.


Fix 4: Rule Out a Proxy or Filter

On a corporate network, a proxy that intercepts the GitHub API request and returns an HTML error or login page produces the same symptom — the parser finds no asset data in a document that is not JSON.

# Should return JSON, not HTML
curl -s https://api.github.com/repos/openai/codex/releases/latest | head -5

If that returns HTML, a proxy is interfering. Configure HTTPS_PROXY and HTTP_PROXY for your environment, or install from npm through your internal registry mirror instead.


Verify the Fix

codex --version
which -a codex

codex --version should print the version you expected. which -a codex should print one path — if it prints two, you now have both a standalone install and an npm global install, and the one earlier in PATH wins. That mismatch is the usual reason an update appears to succeed while the old version keeps running.

If codex is not found at all after installing, the binary is not on your PATH — see zsh: command not found: codex for the PATH fixes, and Unable to locate the Codex CLI binary if an IDE integration reports it missing.


Prevention

  • Prefer npm or Homebrew for installs and upgrades if you work behind a shared IP address. Both avoid the anonymous GitHub API entirely.
  • Export a GITHUB_TOKEN in CI images that install developer tooling from GitHub releases. Anonymous rate limits are the most common cause of intermittent, unreproducible install failures in pipelines.
  • Pin versions in CI rather than always taking the latest, so an installer regression cannot break a build without a deliberate change on your side.
  • Keep one install method per machine and check which -a codex after switching.

Summary

  1. The release is not missing — confirm the asset on the GitHub release page
  2. Install from npm (npm install -g @openai/codex) to bypass the script entirely
  3. Set GITHUB_TOKEN if api.github.com/rate_limit shows remaining: 0
  4. Try Homebrew as another script-free path
  5. Check for a proxy returning HTML instead of JSON from the GitHub API
  6. Run which -a codex afterwards to catch a duplicate install

Frequently Asked Questions

Find answers to common questions

The install script could not identify the release assets for the version it was asked to install. It is a failure to read GitHub release metadata, not a sign that the release is missing. The assets are usually present on the release page while the script still reports them absent.

Two documented causes. The script parses the GitHub release JSON with a fragile awk routine that can mis-read the deeply nested response, and it also fails this way when the unauthenticated GitHub API rate limit is exhausted and returns an error document instead of release data.

Wait for the hourly window to reset, or set a GITHUB_TOKEN in your environment before running the installer so the request is authenticated and gets a far higher limit. Shared office and CI IP addresses exhaust the anonymous limit quickly.

Yes, and it is the fastest way around this error. Install from npm with 'npm install -g @openai/codex' or use Homebrew. Both bypass the install script and its release-metadata parsing entirely.

Because codex update fetches the same install script from the hosted endpoint. A fix that had already landed in the repository was not yet reflected in the served copy, so the update path kept failing while the source was correct.

No. An existing installation keeps working. The failure is in the installer and updater path only, so you stay on your current version until you install by another route.

Open the release page on GitHub for the version in the error message and look for the platform archive matching your system, such as a musl or gnu Linux tarball. If it is listed, the assets exist and the fault is in the script's metadata handling.

Use npm with an explicit version, for example 'npm install -g @openai/codex@0.143.0'. That pins the version without going through the install script.

Yes. If a proxy or filter intercepts the GitHub API request and returns an HTML error page, the script's parser sees no valid asset data and reports the same message. Test whether you can reach the GitHub API directly before assuming a rate limit.

Run 'codex --version' to confirm the version, and 'which -a codex' to make sure you do not now have two installations on PATH. Mixing the standalone installer with an npm global install is a common source of later confusion.