You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Copilot CLI internal PowerShell tool fails to spawn pwsh.exe on Windows (ENOENT) #2355
The Copilot CLI works correctly for interactive prompts, but its internal PowerShell tool runtime fails to execute pwsh.exe on this Windows machine.
PowerShell 7 is installed, accessible, and resolves correctly via PATH. The failure is limited to Copilot CLI’s internal command execution (Node.js spawn).
This appears to be a Copilot CLI tool runtime issue rather than an environment misconfiguration.
Affected version
Copilot CLI: v1.0.12 installed via winget
Steps to reproduce the behavior
Steps to Reproduce
Install PowerShell 7.6.0 via winget
Ensure pwsh.exe is accessible via PATH
Install Copilot CLI via winget
Run a Copilot CLI workflow that requires internal PowerShell execution
Expected behavior
Copilot CLI should be able to spawn pwsh.exe and execute PowerShell commands successfully.
Additional context
The following commands work correctly when executed directly in PowerShell:
where pwsh
(Get-Command pwsh).Source
Both resolve to:
C:\Program Files\PowerShell\7\pwsh.exe
pwsh -NoLogo -Command "$PSVersionTable.PSVersion"
Environment
OS: Windows (64-bit)
Copilot CLI: v1.0.12 installed via winget
Installation type: WinGet / MSIX
PowerShell: 7.6.0 (x64)
Installation path: C:\Program Files\PowerShell\7\pwsh.exe
PowerShell x86 was removed to avoid multi-architecture conflicts
The issue persists even with a clean PATH and fresh sessions
This suggests a Copilot CLI internal tool runtime / MSIX sandbox limitation
Junctions and PATH fixes do not resolve the issue
Reacted by gmathi2, underclockeddev, fda-helbling, Baghdad, Boris Ivanov and Alex Waters
The reported issue appears to be related to the ACP CoPilot plugin being unable to execute pwsh commands. We are experiencing this problem on all JetBrains Rider installations. PowerShell 7.6.0 is installed on every machine and is available in the path environment variables. Other ACP plugins we use are able to execute pwsh commands without any issues.
I can confirm I'm experiencing the same issue with Copilot CLI being unable to spawn pwsh.exe.
Environment Details
Copilot CLI Version: v1.0.43
OS: Windows 11
Installation Method: winget
PowerShell 7.6
Error Observed
When attempting to use Copilot CLI commands that require PowerShell execution, I receive:
Error: PowerShell 6+ (pwsh) is not available. Please install it from https://aka.ms/powershell. Error: Command failed: pwsh.exe --version 'pwsh.exe' is not recognized as an internal or external command, operable program or batch
file.
PowerShell Verification
When I manually check PowerShell availability in my terminal:
Thanks for the report. We've shipped fixes in this area since this was filed (most recently in Copilot CLI v1.0.93), and we believe this may now be resolved. Could you retest on the latest release (Copilot CLI v1.0.103) and let us know whether you still see it? If we don't hear back in a couple of weeks, we may close this issue — you can always reopen it.
Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.
Activity
iArxic commentedon Mar 30, 2026
yeah
myth384 commentedon Apr 2, 2026
The reported issue appears to be related to the ACP CoPilot plugin being unable to execute
pwshcommands. We are experiencing this problem on all JetBrains Rider installations. PowerShell 7.6.0 is installed on every machine and is available in thepathenvironment variables. Other ACP plugins we use are able to executepwshcommands without any issues.mbaker-prgs commentedon Apr 3, 2026
Microsoft puts these 0 byte redirect files in the %AppData%\Microsoft\WindowsApps folder which is using copilot CLI to fail to launch pwsh.exe.
Xorpio commentedon May 7, 2026
Confirming Same Issue
I can confirm I'm experiencing the same issue with Copilot CLI being unable to spawn
pwsh.exe.Environment Details
Error Observed
When attempting to use Copilot CLI commands that require PowerShell execution, I receive:
Error: PowerShell 6+ (pwsh) is not available. Please install it from https://aka.ms/powershell. Error: Command failed: pwsh.exe --version 'pwsh.exe' is not recognized as an internal or external command, operable program or batch
file.
PowerShell Verification
When I manually check PowerShell availability in my terminal:
pwsh --version→ PowerShell 7.6.1(Get-Command pwsh).Source→ C:\Program Files\PowerShell\7\pwsh.exeAdditional Context
Impact
This prevents me from using any Copilot CLI features that require PowerShell execution, significantly limiting the tool's functionality on Windows.
sawa-ko commentedon May 21, 2026
Same issue here as Xorpio.
OndrejKut commentedon Jun 2, 2026
Still broken, is there any plan to fix this? Github copilot is unusable because of this.
patniko commentedon Oct 26, 2026
Thanks for the report. We've shipped fixes in this area since this was filed (most recently in Copilot CLI v1.0.93), and we believe this may now be resolved. Could you retest on the latest release (Copilot CLI v1.0.103) and let us know whether you still see it? If we don't hear back in a couple of weeks, we may close this issue — you can always reopen it.
Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.