Bug
All plugin commands (/codex:review, /codex:adversarial-review, /codex:rescue) fail on Windows with:
Environment
- Windows 11
- Node.js 22.x
- Codex CLI 0.118.0 (installed globally via npm, works fine from terminal)
- Claude Code (latest)
Root Cause
scripts/lib/app-server.mjs line 188 spawns codex without shell: true:
this.proc = spawn("codex", ["app-server"], {
cwd: this.cwd,
env: this.options.env,
stdio: ["pipe", "pipe", "pipe"]
});
On Windows, npm install -g @openai/codex creates codex.cmd (not a bare codex binary). Node's spawn without shell: true cannot resolve .cmd wrappers — only shell: true or execSync/spawnSync with shell mode can.
The fix already exists in the same codebase — scripts/lib/process.mjs line 11 correctly handles this:
shell: process.platform === "win32"
But app-server.mjs doesn't apply the same pattern.
Fix
- this.proc = spawn("codex", ["app-server"], {
- cwd: this.cwd,
- env: this.options.env,
- stdio: ["pipe", "pipe", "pipe"]
- });
+ this.proc = spawn("codex", ["app-server"], {
+ cwd: this.cwd,
+ env: this.options.env,
+ stdio: ["pipe", "pipe", "pipe"],
+ shell: process.platform === "win32"
+ });
This is the only spawn("codex", ...) call in the codebase, so this one-line change fixes all commands for Windows users.
Bug
All plugin commands (
/codex:review,/codex:adversarial-review,/codex:rescue) fail on Windows with:Environment
Root Cause
scripts/lib/app-server.mjsline 188 spawnscodexwithoutshell: true:On Windows,
npm install -g @openai/codexcreatescodex.cmd(not a barecodexbinary). Node'sspawnwithoutshell: truecannot resolve.cmdwrappers — onlyshell: trueorexecSync/spawnSyncwith shell mode can.The fix already exists in the same codebase —
scripts/lib/process.mjsline 11 correctly handles this:But
app-server.mjsdoesn't apply the same pattern.Fix
This is the only
spawn("codex", ...)call in the codebase, so this one-line change fixes all commands for Windows users.