Install step can silently produce a broken Codex CLI (missing platform binary)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 170
- PR merge metrics
- No merged PRs in 30d
Description
Summary
npm install -g "@openai/codex@${CODEX_VERSION}" can exit 0 while leaving a CLI that cannot run. The platform binary ships as an aliased optionalDependency, so npm skips it silently when it is not on the registry yet. The install step goes green and the job fails several steps later:
Error: Missing optional dependency @openai/codex-linux-x64.
at findCodexExecutable (.../@openai/codex/bin/codex.js:105:9)
Cause
Platform packages are published after the wrapper becomes latest, so there is a window where @openai/codex@latest resolves but its binary does not exist. Our failing job started installing 0.36s before the binary appeared:
00:32:45.066 @openai/codex@0.149.1 published
00:34:39.865 npm install starts
00:34:40.221 @openai/codex@0.149.1-linux-x64 published
00:34:41.980 "added 1 package" -> no binary
The gap is not specific to that release. Delay between the wrapper and each platform package, from npm view @openai/codex time:
| Version | linux-x64 | darwin-arm64 | linux-arm64 | win32-x64 |
|---|---|---|---|---|
| 0.146.0 | -128s | -57s | -102s | -31s |
| 0.147.0 | -80s | -21s | -57s | +124s |
| 0.148.0 | -13s | +65s | +145s | +213s |
| 0.149.0 | +117s | +183s | +2245s | +214s |
| 0.149.1 | +115s | +181s | +740s | +1413s |
Negative means the binary was published first, which is the safe order. Every platform was safe through 0.146.0; 0.149.0 and 0.149.1 lag on all four.
The publish order belongs to openai/codex. This issue is about the action installing inside that window without noticing.
Environment
- Action:
openai/codex-action@86365089eb2b84e0a8fb0717b304f8bdcb13b20e(v1.12) - Runner:
ubuntu-latest, Node v24.19.0 codex-version: not set, so it resolves tolatest
Suggested fix
Resolve the version first, wait for @openai/codex@<version>-<platform> to exist, then install and confirm the CLI runs. PR #159.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the install flow for codex-action v1.12 and the package-resolution path used when codex-version is unset. Verify version resolution, platform-package availability, installation, and CLI startup; done means the action cannot report success while the platform binary is missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100