Skip to content

Codex Security 0.1.14 Deep Scan fails with spawn EPERM on Windows when CODEX_CLI_PATH is unset #35872

Description

@d0gx

Summary

Codex Security 0.1.14 Deep Scans fail before discovery on Windows when CODEX_CLI_PATH is unset and PATH resolves codex to the extensionless npm shim.

The Deep Scan worker ultimately calls Node's child_process.spawn with the literal command codex. On this PATH layout, Windows selects %APPDATA%\npm\codex (the extensionless npm shim) and Node returns EPERM. The plugin should resolve a Windows-executable launcher (codex.cmd / codex.exe) or use the Codex executable bundled with the desktop app.

Environment

  • Windows 10.0.26200.8894, x64
  • ChatGPT desktop app 26.721.4979.0
  • Codex Security plugin 0.1.14 (hosted catalog)
  • Codex CLI: reproduced with 0.145.0; the minimal launcher reproduction remains on 0.146.0
  • Node.js v24.15.0
  • PowerShell 5.1.26100.8894
  • Codex CLI installed globally through npm
  • CODEX_CLI_PATH unset

Steps to reproduce

  1. On Windows, install Codex CLI globally through npm so %APPDATA%\npm is on PATH and contains the extensionless codex shim.
  2. Leave CODEX_CLI_PATH unset.
  3. In the ChatGPT desktop app with Codex Security 0.1.14, start a Deep Security Scan on a local Git repository.
  4. Complete setup and allow the preflight to pass.
  5. Wait for discovery workers to launch.

Actual behavior

Deep discovery terminates immediately with spawn EPERM. No worker completes and no candidates are produced. Sanitized coordinator result:

{
  "status": "failed",
  "discoveryCount": 0,
  "failure": {
    "phase": "discovery",
    "message": "spawn EPERM",
    "kind": "Error:EPERM"
  }
}

The standalone launcher behavior is reproducible:

node -e "const {spawn}=require('child_process'); spawn('codex',['--version'])"
# Error: spawn EPERM

Spawning the direct npm-installed codex.exe from Node succeeds and prints codex-cli 0.146.0.

Expected behavior

Deep Scan should resolve and launch a valid Windows Codex executable without requiring users to configure CODEX_CLI_PATH manually.

Workaround

Set CODEX_CLI_PATH to the direct npm-installed codex.exe and restart the desktop app.

Suggested fix

On Windows, avoid passing the bare literal codex to child_process.spawn when the extensionless npm shim may win PATH resolution. Resolve codex.cmd / codex.exe, use the SDK's platform binary resolver, or pass the desktop-bundled executable path to the plugin MCP process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingskillsIssues related to skillstool-callsIssues related to tool callingwindows-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