[Bug] npm install -g fails with corrupted binary due to sandbox offline mode

Resolved 💬 0 comments Opened Jun 23, 2026 by yxak4985 Closed Jun 27, 2026

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

Codex Desktop: 26.616.6631.0

What subscription do you have?

plus

What platform is your computer?

Windows 11 x64

What issue are you seeing?

npm install -g @openai/codex` fails inside the Codex sandbox because npm is forced into offline mode, resulting in a silently corrupted installation.

What steps can reproduce the bug?

  1. On Windows x64, run Codex Desktop (26.616.6631.0)
  2. Open a Codex terminal thread
  3. Run:npm install -g @openai/codex@latest

What is the expected behavior?

Expected Behavior

npm downloads the platform binary (@openai/codex-win32-x64, ~150MB compressed) and the CLI works after install.

Actual Behavior

The sandbox forces npm into offline mode (offline=true env var). This causes:

  • The wrapper package (@openai/codex@0.142.0, 3.9KB) installs
  • The platform binary downloads but is corrupted (199MB file with PE .text section raw size exceeding file size -- truncated)
  • The package.json for @openai/codex-win32-x64 is never created
  • Running Codex fails: Error: Missing optional dependency @openai/codex-win32-x64

Additional information

  • Network to registry.npmjs.org is confirmed healthy (DNS resolves, TCP 443 open)
  • The issue is purely sandbox-side -- not a network, proxy, or permission problem
  • Auto-review escalation failure is a separate server-side bug (wrong model name codex-auto-review being passed) that compounds the problem by preventing any privilege-elevated workaround

View original on GitHub ↗