Summary
On Windows, all review and task commands fail with spawn codex ENOENT because SpawnedCodexAppServerClient in scripts/lib/app-server.mjs uses child_process.spawn("codex", ...) without shell: true. Node.js spawn on Windows uses CreateProcessW, which only resolves .exe binaries — not the .cmd wrappers that npm install -g creates.
Environment
- OS: Windows 11 Enterprise 10.0.26100
- Node: v25.4.0
- npm: 11.7.0
- Codex CLI: @openai/codex 0.117.0 (installed globally via npm)
- Plugin version: latest from marketplace
Steps to Reproduce
- Install Codex globally on Windows:
npm install -g @openai/codex
- Run
/codex:setup — reports ready: true, all checks pass
- Run
/codex:review --base <branch> — fails with:
Root Cause
The codebase already handles this correctly in scripts/lib/process.mjs — both runCommand and binaryAvailable set shell: process.platform === "win32" (line 12), which is why /codex:setup succeeds.
However, scripts/lib/app-server.mjs line 188 spawns the app server without this flag:
// app-server.mjs:188-192
this.proc = spawn("codex", ["app-server"], {
cwd: this.cwd,
env: this.options.env,
stdio: ["pipe", "pipe", "pipe"]
});
Suggested Fix
Add the same platform-aware shell option already used in process.mjs:
this.proc = spawn("codex", ["app-server"], {
cwd: this.cwd,
env: this.options.env,
stdio: ["pipe", "pipe", "pipe"],
shell: process.platform === "win32"
});
Verified locally — reviews and tasks run successfully after this one-line change.
Summary
On Windows, all review and task commands fail with
spawn codex ENOENTbecauseSpawnedCodexAppServerClientinscripts/lib/app-server.mjsuseschild_process.spawn("codex", ...)withoutshell: true. Node.jsspawnon Windows usesCreateProcessW, which only resolves.exebinaries — not the.cmdwrappers thatnpm install -gcreates.Environment
Steps to Reproduce
npm install -g @openai/codex/codex:setup— reportsready: true, all checks pass/codex:review --base <branch>— fails with:Root Cause
The codebase already handles this correctly in
scripts/lib/process.mjs— bothrunCommandandbinaryAvailablesetshell: process.platform === "win32"(line 12), which is why/codex:setupsucceeds.However,
scripts/lib/app-server.mjsline 188 spawns the app server without this flag:Suggested Fix
Add the same platform-aware
shelloption already used inprocess.mjs:Verified locally — reviews and tasks run successfully after this one-line change.