Summary
I’m seeing a Windows launch failure with ucode copilot when GitHub Copilot CLI is installed through npm.
What Works
Steps to Reproduce
- Install GitHub Copilot CLI through
npm on Windows.
- Configure
ucode as usual.
- Run:
Actual Behavior
ucode prints:
Starting GitHub Copilot CLI
It then exits with:
FileNotFoundError: [WinError 2] The system cannot find the file specified
The traceback points to subprocess.Popen(...) in ucode/agents/copilot.py, where ucode attempts to launch the bare command name copilot. The failure occurs before the Copilot CLI itself starts.
Expected Behavior
ucode copilot should resolve and launch the npm-installed GitHub Copilot CLI on Windows while preserving ucode’s environment, MCP configuration, Gateway settings, and token-refresh behavior.
Suspected Cause
On Windows, npm commonly exposes CLI commands through wrappers such as copilot.cmd and copilot.ps1, rather than a native copilot.exe. An interactive shell can resolve these wrappers, but Python’s direct process-creation path does not reliably resolve a .cmd shim when ucode passes copilot directly to subprocess.Popen with shell=False.
Suggested Fix
Could the Windows launcher resolve npm-installed commands with shutil.which() and invoke a .cmd shim through cmd.exe /d /c?
A reusable Windows helper for npm-based agents may also address the same issue for other CLI integrations. In particular, the launcher could:
- Resolve
copilot.cmd on Windows.
- Use the resolved command for validation and launch.
- Invoke the shim through
cmd.exe /d /c rather than passing it directly to subprocess.Popen.
Environment
| Component |
Details |
| OS |
Windows [version/build] |
| Shell |
Git Bash / MINGW64 |
| Python |
3.13 |
| ucode |
[version or commit] |
| GitHub Copilot CLI |
[version] |
| Copilot CLI Installation |
npm [package/version] |
| ucode Installation |
uv [version] |
Additional Context
This may be related to existing Windows/PATHEXT handling issues. I’m reporting the specific ucode copilot failure separately because the repository documents Copilot CLI as a supported integration.
Attached Screenshots:

Summary
I’m seeing a Windows launch failure with
ucode copilotwhen GitHub Copilot CLI is installed throughnpm.What Works
ucodestarts successfully.Steps to Reproduce
npmon Windows.ucodeas usual.Actual Behavior
ucodeprints:It then exits with:
The traceback points to
subprocess.Popen(...)inucode/agents/copilot.py, whereucodeattempts to launch the bare command namecopilot. The failure occurs before the Copilot CLI itself starts.Expected Behavior
ucode copilotshould resolve and launch the npm-installed GitHub Copilot CLI on Windows while preservingucode’s environment, MCP configuration, Gateway settings, and token-refresh behavior.Suspected Cause
On Windows,
npmcommonly exposes CLI commands through wrappers such ascopilot.cmdandcopilot.ps1, rather than a nativecopilot.exe. An interactive shell can resolve these wrappers, but Python’s direct process-creation path does not reliably resolve a.cmdshim whenucodepassescopilotdirectly tosubprocess.Popenwithshell=False.Suggested Fix
Could the Windows launcher resolve npm-installed commands with
shutil.which()and invoke a.cmdshim throughcmd.exe /d /c?A reusable Windows helper for npm-based agents may also address the same issue for other CLI integrations. In particular, the launcher could:
copilot.cmdon Windows.cmd.exe /d /crather than passing it directly tosubprocess.Popen.Environment
[version/build][version or commit][version][package/version][version]Additional Context
This may be related to existing Windows/
PATHEXThandling issues. I’m reporting the specificucode copilotfailure separately because the repository documents Copilot CLI as a supported integration.Attached Screenshots: