Skip to content

fix: wait for the Codex platform binary before installing - #159

Open
devFancy wants to merge 1 commit into
openai:mainfrom
devFancy:fix/issue-158-install-verification
Open

fix: wait for the Codex platform binary before installing#159
devFancy wants to merge 1 commit into
openai:mainfrom
devFancy:fix/issue-158-install-verification

Conversation

@devFancy

@devFancy devFancy commented Aug 24, 2026

Copy link
Copy Markdown

Closes #158.

Why

npm install -g "@openai/codex@${CODEX_VERSION}" can exit 0 while leaving a CLI that cannot run. The platform binary is an aliased optionalDependency, so npm skips it silently when it is not published yet, and the job fails several steps later with Missing optional dependency @openai/codex-linux-x64.

Platform packages are published after the wrapper becomes latest, so there is a window where latest resolves but its binary does not exist. For 0.149.1 that was 115s on linux-x64 and 1413s on win32-x64. Measurements in #158.

Fixing the publish order itself belongs to openai/codex. This change stops the action from installing inside the window without noticing.

What changed

Resolve the version first, wait for @openai/codex@<version>-<platform> to appear on the registry, then install, then confirm the CLI runs.

  • The wait polls every 10s for up to 300s and breaks as soon as the package exists, so a normal run costs one extra npm view.
  • 300s covers 60 of the 64 stable-release publish gaps I measured. Longer gaps now fail at the install step with a clear message instead of surfacing later as what looks like a Codex bug.
  • The check runs with CODEX_HOME under ${RUNNER_TEMP} so it does not create ~/.codex before the action resolves the real Codex home.

Testing

  • corepack pnpm test
  • corepack pnpm run check

check passes. test gives the same result before and after this change (138 pass, 1 fail, 2 cancelled); the failure is --disable-sigusr1 is not allowed in NODE_OPTIONS from a local Node 18 and is unrelated.

I also exercised the step against the registry: the normal path installs without waiting, a stubbed unpublished platform package makes it wait and then proceed once the package appears, and deleting @openai/codex/node_modules/@openai/codex-<platform> makes the final check fail as intended.

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@devFancy

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Aug 24, 2026
@devFancy
devFancy force-pushed the fix/issue-158-install-verification branch 2 times, most recently from b945004 to 1378a26 Compare August 24, 2026 01:43
@devFancy
devFancy force-pushed the fix/issue-158-install-verification branch from 1378a26 to 6691bc7 Compare August 24, 2026 01:56
@devFancy devFancy changed the title fix: fail install step when the Codex platform binary is missing fix: wait for the Codex platform binary before installing Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install step can silently produce a broken Codex CLI (missing platform binary)

1 participant