-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Description
Problem
On Windows, all terminal commands spawned via createTerminal (ACP protocol) fail with spawn ENOENT, even when the command exists in PATH.
This affects every command: git,
ode, where, cmd, etc.
Root Cause
�uildTerminalSpawnOptions() in session-*.js does not set shell: true. On Windows, Node.js child_process.spawn() without shell: true does not use cmd.exe to resolve commands from PATH — it tries to find the executable directly, which fails for commands that rely on PATH resolution or PATHEXT.
On Linux/macOS this works because the OS kernel handles PATH resolution during �xecve(). Windows does not.
Current Code
function buildTerminalSpawnOptions(cwd, env) {
return {
cwd,
env: toEnvObject(env),
stdio: ["ignore", "pipe", "pipe"],
windowsHide: true
};
}Fix
function buildTerminalSpawnOptions(cwd, env) {
return {
cwd,
env: toEnvObject(env),
stdio: ["ignore", "pipe", "pipe"],
shell: process.platform === "win32",
windowsHide: true
};
}Reproduction
- Run acpx on Windows with any ACP agent (claude-code-acp, codex, etc.)
- Agent tries to execute any terminal command (e.g.
git --version) - Error:
spawn git --version ENOENT
Environment
- Windows 11
- Node.js v24.13.0
- acpx 0.3.0
- Git installed at
C:\Program Files\Git\cmd\git.exe(in PATH)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.