fix: start codex on Windows by using shell; keep mcp args parseable (#40)

Windows global installs expose codex as codex.cmd; spawning 'codex' without shell hits ENOENT.

Enable shell to align with Claude's Windows behavior and resolve PATH lookup.

Shell spawn makes cmd.exe strip TOML double quotes in -c arrays, so args become a string.

Switch mcp args to TOML literal (single-quoted) arrays to preserve types; update tests.
This commit is contained in:
zrq8
2026-01-08 10:44:01 +08:00
committed by GitHub
parent 9dc69d1e80
commit 2646df346e
3 changed files with 20 additions and 6 deletions
+2 -1
View File
@@ -80,7 +80,8 @@ export async function codexLocal(opts: {
spawnName: 'codex',
installHint: 'Codex CLI',
includeCause: true,
logExit: true
logExit: true,
shell: process.platform === 'win32'
});
} finally {
process.stdin.resume();