From 43195bf1aa006f8f2e6c69151e498465e235a407 Mon Sep 17 00:00:00 2001 From: Carson Adams Date: Mon, 30 Mar 2026 22:43:41 -0500 Subject: [PATCH] fix: add shell: true on Windows for codex app-server spawn On Windows, npm installs global packages as .cmd batch wrappers. Node.js spawn() without shell: true cannot resolve .cmd files, causing ENOENT when launching the app-server. This matches the existing pattern in process.mjs (line 12) where runCommand and binaryAvailable already set shell on win32. Fixes #32 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");