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 to latest
Suggested fix
Resolve the version first, wait for @openai/codex@<version>-<platform> to exist, then install and confirm the CLI runs. PR #159.
Summary
npm install -g "@openai/codex@${CODEX_VERSION}"can exit0while leaving a CLI that cannot run. The platform binary ships as an aliasedoptionalDependency, 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:Cause
Platform packages are published after the wrapper becomes
latest, so there is a window where@openai/codex@latestresolves but its binary does not exist. Our failing job started installing 0.36s before the binary appeared:The gap is not specific to that release. Delay between the wrapper and each platform package, from
npm view @openai/codex time: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
openai/codex-action@86365089eb2b84e0a8fb0717b304f8bdcb13b20e(v1.12)ubuntu-latest, Node v24.19.0codex-version: not set, so it resolves tolatestSuggested fix
Resolve the version first, wait for
@openai/codex@<version>-<platform>to exist, then install and confirm the CLI runs. PR #159.