Skip to content

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

@joshua-lehmann

Description

@joshua-lehmann

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
  3. Verify folder removed: npm ls -g | Select-String codex
  4. Fresh install: npm install -g @openai/codex
  5. Try launching:
    codex --version
    codex --sandbox none
  6. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions