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 ↗

3 Comments

brozkeff · 5 months ago

Confirmed regression on 0.115 not just on MacOS but also (at least some) Linux.

I encounted the same issue on Linux Mint 21.3 (based on Ubuntu 22.04 LTS). 0.115 fails, downgrade to 0.114 works fine. Previous versions also worked fine.

Using Node 24.14.0

Error: Missing optional dependency @openai/codex-linux-x64. Reinstall Codex: npm install -g @openai/codex@latest at file:///home/brozkeff/.local/lib/node_modules/@openai/codex/bin/codex.js:100:11 at ModuleJob.run (node:internal/modules/esm/module_job:430:25) at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:661:26) at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)
Node.js v24.14.0
SproutSeeds · 5 months ago

I checked the published 0.115.0 package path pretty closely, and I could not reproduce this as a universal release break on macOS arm64.

  • npm view @openai/codex@0.115.0 optionalDependencies --json still shows the expected platform aliases, including @openai/codex-darwin-arm64 and @openai/codex-linux-x64
  • npm pack on the published 0.115.0-darwin-arm64 and 0.115.0-linux-x64 artifacts shows the expected vendored native binary + rg
  • on my macOS arm64 machine with Node v24.10.0 / npm 11.6.0, both of these worked:
  • clean install of @openai/codex@0.115.0
  • global-style upgrade from 0.114.0 to 0.115.0
  • in both cases npm actually installed @openai/codex-darwin-arm64, and node .../bin/codex.js --version launched successfully as codex-cli 0.115.0

So the narrow claim I can support is:

  • this does not currently look like a missing optional dependency declaration
  • this also does not currently look like a universally broken 0.115.0 platform tarball
  • it likely depends on install state, package manager behavior, or the shape of the affected global node_modules tree

The most useful next evidence from affected machines would be:

node -v
npm -v
npm ls -g --depth=2 @openai/codex @openai/codex-darwin-arm64 @openai/codex-linux-x64

and, from the installed Codex location, whether the platform package is actually present under the expected nested path:

ls -R $(npm root -g)/@openai/codex/node_modules/@openai

That would tell us whether the regression is "npm never installed the aliased optional package" vs "the launcher can't resolve a package that is present".

brozkeff · 5 months ago

I cannot replicate it anymore, currently the update to 0.115.0 on Linux passed and codex works:

initial state on linux

$ npm -v
11.9.0
$ node -v
v24.14.0
$ npm ls -g --depth=2 @openai/codex @openai/codex-darwin-arm64 @openai/codex-linux-x64
/home/brozkeff/.local/lib
└─┬ @openai/codex@0.114.0
  └── @openai/codex-linux-x64@npm:@openai/codex@0.114.0-linux-x64

upgrade to v0.115.0

npm install -g @openai/codex

changed 2 packages in 6s

# npm ls -g --depth=2 @openai/codex @openai/codex-darwin-arm64 @openai/codex-linux-x64
/home/brozkeff/.local/lib
└─┬ @openai/codex@0.115.0
  └── @openai/codex-linux-x64@npm:@openai/codex@0.115.0-linux-x64

result

Codex 0.115.0 now runs fine on Linux.

Previous behaviour could be somehow incorrectly downloaded update via npm install leving the package in inconsistent state. Perhaps @TholeG could now test again the Mac version, the issue may have been something temporary in the npm backend.