[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?
- On Windows x64, run Codex Desktop (26.616.6631.0)
- Open a Codex terminal thread
- 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
.textsection raw size exceeding file size -- truncated) - The
package.jsonfor@openai/codex-win32-x64is never created - Running Codex fails:
Error: Missing optional dependency @openai/codex-win32-x64
Additional information
- Network to
registry.npmjs.orgis 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-reviewbeing passed) that compounds the problem by preventing any privilege-elevated workaround