Bug: @openai/codex 0.115.0 fails on macOS Apple Silicon with missing optional dependency @openai/codex-darwin-arm64

Open 💬 3 comments Opened Mar 16, 2026 by TholeG

What version of Codex CLI is running?

0.115.0 fails immediately after install.

Confirmed workaround: 0.114.0 installs and runs correctly on the same machine.

What subscription do you have?

Plus

Which model were you using?

_No response_

What platform is your computer?

macOS on Apple Silicon (darwin arm64)

What terminal emulator and version are you using (if applicable)?

zsh on macOS

What issue are you seeing?

Installing the current npm release succeeds, but the CLI immediately fails at runtime because the platform-specific optional dependency is missing.

npm install -g @openai/codex
# changed 2 packages in 7s

codex --version

Then:

file:///Users/<user>/.npm-global/lib/node_modules/@openai/codex/bin/codex.js:100
    throw new Error(
          ^

Error: Missing optional dependency @openai/codex-darwin-arm64. Reinstall Codex: npm install -g @openai/codex@latest

What steps can reproduce the bug?

node -v
# v22.15.0

npm -v
# 11.11.0

uname -m
# arm64

node -p 'process.platform + " " + process.arch'
# darwin arm64

npm uninstall -g @openai/codex
npm install -g @openai/codex
codex --version

What is the expected behavior?

codex --version should print the installed CLI version.

Additional information

The npm debug log for the failed install contains:

verbose reify failed optional dependency /Users/<user>/.npm-global/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64

A few extra observations from local debugging:

  • @openai/codex@0.115.0 installs the wrapper package, but @openai/codex-darwin-arm64 is not present in a usable form afterwards.
  • @openai/codex@0.114.0 installs correctly on the same machine and codex --version works.
  • The published variant version appears to exist on npm (0.115.0-darwin-arm64), so this looks like a packaging / optional dependency regression in 0.115.0 on macOS ARM64.

Current workaround:

npm install -g @openai/codex@0.114.0

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗