Skip to content

fix(acp): AcpClient Windows ENOENT — .cmd shim not resolved #401

@Lygggggg

Description

@Lygggggg

Problem

AcpClient.initialize() uses bare child_process.spawn() which cannot locate npm-global .cmd shims on Windows, causing spawn gemini ENOENT when starting ACP agent processes.

Root Cause

The non-ACP CLI spawn path (cli-spawn.ts) already has a 3-tier Windows fallback (resolve .cmd → Git Bash → cmd.exe), but AcpClient was missing this handling.

Fix

PR #400 — reuse the same resolveWindowsShimSpawn / findGitBashPath / escape helpers from cli-spawn-win.ts in AcpClient.initialize(). Skipped when custom spawnFn is injected (test path unchanged).

Related: #64 (original Windows ENOENT discussion, now closed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagedMaintainer reviewed, replied, and made an initial triage decision

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions