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
This is on windows. Whenever I try to make it do anything, it fails to run any command (powershell or CMD)
Below is just an extract of me asking it to describe the project structure for a folder it has access to.
● I'll help you explore the directory structure of the current working directory.
✗ List directory .
Unhandled error: Error: Command timed out
●
Let me try using PowerShell to list the directory structure:
✓ List all directories recursively up to 2 levels deep
$ Get-ChildItem -Path . -Directory -Recurse -Depth 2 | Select-Object FullName
↪ 1 line...
✗ read_powershell
Invalid session ID: main. Please supply a valid session ID to read output from.
●
Let me try a simpler approach:
✓ List directories in current folder
$ Get-ChildItem -Directory | Select-Object Name
↪ 1 line...
✓ stop_powershell
↪ 1 line...
●
Let me try with a fresh session and simpler command:
✓ List directories
$ ls -Directory
↪ 1 line...
✓ stop_powershell
↪ 1 line...
●
Let me try with tree command:
✗ Show directory tree structure
$ tree /F /A
Permission denied and could not request permission from user
●
Let me try using Get-ChildItem with limited output:
✗ List items in current directory
$ Get-ChildItem | Format-Table Name, Mode -AutoSize
Permission denied and could not request permission from user
@javiercn confirmed that his PowerShell profile emits a lot of extra info by default on startup. I suspect this is confusing the output parser. So I expect we can fix this by passing -NoProfile to pwsh.exe when running shell commands (which is something we should be doing anyway to avoid any other interference).
@RyanHecht I seem to still get this error in version 0.0.336, so not sure it has been resolved
✗ Get current branch name
$ git rev-parse --abbrev-ref HEAD
<exited with error: PowerShell 6+ (pwsh) is not available. Please install it from https://aka.ms/powershell. Error: Error: Command failed: pwsh.exe --version
'pwsh.exe' is not recognized as an internal or external command,
operable program or batch file.
>
PS C:\> copilot -version
0.0.336
Commit: 75151b8
Reacted by uyrabi, Joaquin Guerrero, Ahmad Bassel and Milton
I have same problem with GitHub Copilot v0.0.395 and I have pwsh.exe --version -> PowerShell 7.5.4 in my system currently installed. Claude cli, Gemini cli and Cursor cli all work fine.
Something wrong with copilot cli. not just python commands, any powershell or git commands all are failing with the same error message:
I am using GitHub Copilot CLI 0.0.409. on Windows 11 with PowerShell 7.5.4
I can see that different issues were reported here. To solve the last one from @mfide one has to update powershell on windows at least to version 6 as copilot itself suggested:
● The issue is with the environment configuration, not my capabilities.
The powershell tool I have access to is configured to use PowerShell 6+ (pwsh.exe), but this system appears to only have Windows PowerShell 5.1 installed.
Error message (in German):
Error: Command failed: pwsh.exe --version
Der Befehl "pwsh.exe" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Translation: "The command 'pwsh.exe' is either misspelled or could not be found."
The Problem:
- The CLI tool wrapper expects pwsh.exe (PowerShell Core/6+)
- Your system doesn't have it installed
- You likely have Windows PowerShell
5.1 instead
Solutions:
1. Install PowerShell 6+ from https://aka.ms/powershell (https://aka.ms/powershell)
2. Or: Use your local terminal directly (PowerShell, CMD, or Git Bash) and run commands yourself - I can provide guidance
nevertheless, this doesn't solve the fact that most shell commands doesn't really work. For instance:
Activity
SteveSandersonMS commentedon Oct 6, 2025
@javiercn confirmed that his PowerShell profile emits a lot of extra info by default on startup. I suspect this is confusing the output parser. So I expect we can fix this by passing
-NoProfiletopwsh.exewhen running shell commands (which is something we should be doing anyway to avoid any other interference).RyanHecht commentedon Oct 6, 2025
We've fixed this in 0.0.335!
glenschrader commentedon Oct 8, 2025
@RyanHecht I seem to still get this error in version 0.0.336, so not sure it has been resolved
SteveSandersonMS commentedon Oct 9, 2025
@glenschrader That's a different thing - as per the message, you do need to install PowerShell (6+), as it's a prerequisite for this tool on Windows.
glenschrader commentedon Oct 9, 2025
@SteveSandersonMS thanks, I have to admit I just assumed Windows 11 would have the latest powershell installed (or at least 6).
whirlwin commentedon Oct 20, 2025
Still getting the "Permission denied and could not request permission from user" in version 0.0.346. Commit: 74e4d22
myoung34 commentedon Oct 21, 2025
Im getting this and it's unclear why
It works in
copilotbut notcopilot -pfatihdurgut commentedon Nov 17, 2025
I'm also getting the similar error even in the Administrator mode.
mfide commentedon Jan 26, 2026
I have same problem with GitHub Copilot v0.0.395 and I have pwsh.exe --version -> PowerShell 7.5.4 in my system currently installed. Claude cli, Gemini cli and Cursor cli all work fine.
Something wrong with copilot cli. not just python commands, any powershell or git commands all are failing with the same error message:

williamomeara commentedon Jan 27, 2026
❯ run pwd
✓ Print working directory
$ pwd
└ 1 line...
Read shell output:
Waiting up to 5 seconds for command output
Invalid session ID: 0. Please supply a valid session ID to read output from.
same issue here....
nicola853 commentedon Jan 28, 2026
My initial command:
copilot -p "Read SPEC.md and start the project"
Same problem, message repeated:
Permission denied and could not request permission from user
Fixed by adding:
copilot -p "Read SPEC.md and start the project" --allow-all
ahmadbass3l commentedon Feb 13, 2026
I am using GitHub Copilot CLI 0.0.409. on Windows 11 with PowerShell 7.5.4
I can see that different issues were reported here. To solve the last one from @mfide one has to update powershell on windows at least to version 6 as copilot itself suggested:
nevertheless, this doesn't solve the fact that most shell commands doesn't really work. For instance:
lsorpwdwould workRedEye-Developers commentedon Mar 14, 2026
i also have same issue copilot can't able to access both
cmdandpwsh.RedEye-Developers commentedon Mar 14, 2026
@RyanHecht the issue was not fixed.
danparisi commentedon May 7, 2026
Same for me with latest version
Permission denied and could not request permission from user