Windows: app-server.mjs spawn('codex') fails with ENOENT due to missing shell:true
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript, node.js
Research direction
Start in scripts/lib/app-server.mjs at the spawn call around line 188, then compare the process spawning options in scripts/lib/process.mjs around line 11. Confirm the Windows app-server launch uses the same platform-specific shell behavior, and verify that the Codex app-server starts successfully in the reported Windows setup.
Written by the indexing model from the issue text.
Description
Bug Description
On Windows, the Claude Code plugin's codex-companion.mjs fails to start the Codex app-server with spawn codex ENOENT when running adversarial-review or other commands that use the app-server runtime.
Root Cause
In scripts/lib/app-server.mjs line 188, spawn("codex", ["app-server"]) is called without shell: true. On Windows, npm global binaries are installed as .cmd wrappers, and Node.js spawn cannot resolve .cmd files without shell: true.
The fix already exists in scripts/lib/process.mjs line 11 (shell: process.platform === "win32"), but was not applied to app-server.mjs.
Steps to Reproduce
- Windows 11 with Node.js managed via fnm (or any npm global install)
- Install Codex globally:
npm install -g @openai/codex - Install the Codex plugin in Claude Code
- Run
/codex:setup— succeeds (usesprocess.mjswhich hasshell: true) - Run
/codex:adversarial-review— fails withspawn codex ENOENT
Fix
// scripts/lib/app-server.mjs line 188
this.proc = spawn("codex", ["app-server"], {
cwd: this.cwd,
env: this.options.env,
- stdio: ["pipe", "pipe", "pipe"]
+ stdio: ["pipe", "pipe", "pipe"],
+ shell: process.platform === "win32"
});
Environment
- OS: Windows 11 (10.0.26200)
- Node.js: v22.22.0 (managed via fnm)
- codex-cli: 0.117.0
- Claude Code plugin: codex 1.0.1
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·