From 37feddb71bf141f389117d5af475c551a4562216 Mon Sep 17 00:00:00 2001 From: alexhuang0915 Date: Tue, 31 Mar 2026 14:24:46 +0800 Subject: [PATCH] fix: add shell option for Windows spawn in app-server On Windows, npm global binaries are installed as `.cmd` wrappers. Node.js `spawn()` without `shell: true` cannot resolve these, causing `ENOENT` when launching `codex app-server`. This matches the pattern already used in `process.mjs` line 11: `shell: process.platform === "win32"` Co-Authored-By: Claude Opus 4.6 (1M context) --- plugins/codex/scripts/lib/app-server.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/codex/scripts/lib/app-server.mjs b/plugins/codex/scripts/lib/app-server.mjs index abf3d0c..e0a15eb 100644 --- a/plugins/codex/scripts/lib/app-server.mjs +++ b/plugins/codex/scripts/lib/app-server.mjs @@ -188,7 +188,8 @@ class SpawnedCodexAppServerClient extends AppServerClientBase { 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" }); this.proc.stdout.setEncoding("utf8");