App-server process fails with ENOENT due to incorrect binary path (codex/codex vs bin/codex) on macOS ARM64

Open 💬 1 comment Opened Jul 9, 2026 by Kehan-Peng

What version of the Codex App are you using (From “About Codex” dialog)?

Latest version installed via npm install -g @openai/codex on 2026-07-09 (please fill in exact version if available)

What subscription do you have?

GPT Plus

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

After installing the Codex CLI globally via npm, running codex app-server fails immediately with:

Error: App-server process exited
Error: spawn /opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex/codex ENOENT

The error indicates that the Node.js wrapper script is looking for the native binary at .../vendor/aarch64-apple-darwin/codex/codex, but this path does not exist. Manual inspection shows the actual binary is installed at .../vendor/aarch64-apple-darwin/bin/codex (notice bin/codex instead of codex/codex). The file is present, executable, and ~248 MB in size.

What steps can reproduce the bug?

Temporary workaround
Creating a symbolic link from the expected path to the actual binary resolves the immediate ENOENT error:

mkdir -p .../vendor/aarch64-apple-darwin/codex
ln -s .../vendor/aarch64-apple-darwin/bin/codex .../vendor/aarch64-apple-darwin/codex/codex

What is the expected behavior?

The installation should place the binary at the path the wrapper expects, or the wrapper should be updated to look in the correct bin/ subdirectory. This is likely a packaging regression in the npm module.

Additional information

Steps to reproduce

  1. Install the package globally: npm install -g @openai/codex
  2. Run codex app-server --listen stdio://
  3. Observe the ENOENT error.

Suggested fix

  1. Update the codex.js entry script to reference bin/codex instead of codex/codex, or
  2. Modify the postinstall script to symlink or copy the binary to the expected location.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗