Windows: Codex CLI fails with spawn EPERM even after clean reinstall (Node 24, NVM, Windows 10/11)

Resolved 💬 4 comments Opened Dec 10, 2025 by joshua-lehmann Closed Mar 29, 2026

What version of Codex is running?

0.66.0

What subscription do you have?

ChatGPT Plus

Which model were you using?

Not applicable (Codex fails before model selection).

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What issue are you seeing?

Codex CLI fails to start on Windows. Running any command like:
codex
codex --version
codex --sandbox none

results in:

node:internal/child_process:421
    throw new ErrnoException(err, 'spawn');
          ^

Error: spawn EPERM
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at spawn (node:child_process:796:9)
    at file:///C:/Tools/Dev/nvm/v24.11.0/node_modules/@openai/codex/bin/codex.js:115:15
    at ModuleJob.run (node:internal/modules/esm/module_job:377:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:691:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5) {
  errno: -4048,
  code: 'EPERM',
  syscall: 'spawn'
}

Node.js v24.11.0

There is no output when running: where codex

What steps can reproduce the bug?

  1. Install Node via NVM (Node v24.11.0)
  2. Run:

npm uninstall -g @openai/codex
npm cache clean --force

  1. Verify folder removed: npm ls -g | Select-String codex
  2. Fresh install: npm install -g @openai/codex
  3. Try launching:

codex --version
codex --sandbox none

  1. Result: always returns spawn EPERM and aborts.

What is the expected behavior?

Codex CLI should start normally and print the version.
It should not fail with EPERM spawn errors on a clean Windows installation.

Additional information

  • I performed a full clean reinstall using NVM and npm.
  • No antivirus alerts and Controlled Folder Access is off.
  • The CLI does not create a visible binary or Windows blocks spawning it.
  • Running where codex returns nothing.
  • Running inside WSL2 works, so this seems Windows-specific.

Powershell Version: 7.5.4

View original on GitHub ↗

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