-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
Describe the bug
I am trying this:
echo 'What is 2+2? Reply with just the number.' >test-prompt.txt &&
npx -y @github/copilot@0.0.406 -p 'Read and follow the instructions in @test-prompt.txt'When I run this in Linux, I get this:
virtualbox@gitforwindows /mnt/d/124 (shears/next)
$ echo 'What is 2+2? Reply with just the number.' >test-prompt.txt &&
npx -y @github/copilot@0.0.406 -p 'Read and follow the instructions in @test-prompt.txt'
I'll read the test-prompt.txt file to see the instructions.
● Read test-prompt.txt
└ 6 lines read
4
Total usage est: 1 Premium request
API time spent: 7s
Total session time: 15s
Total code changes: +0 -0
Breakdown by AI model:
claude-sonnet-4.5 37.6k in, 183 out, 18.3k cached (Est. 1 Premium request)When I run this on Windows, in a Git Bash, I get this, though:
$ echo 'What is 2+2? Reply with just the number.' >test-prompt.txt &&
npx -y @github/copilot@0.0.406 -p 'Read and follow the instructions in @test-prompt.txt'
✗ Read test-prompt.txt
Permission denied and could not request permission from user
✗ Read test-prompt.txt file
$ Get-Content -Path "D:\123\test-prompt.txt"
Permission denied and could not request permission from user
✗ List directory and verify location
$ Set-Location "D:\123"; Get-ChildItem
Permission denied and could not request permission from user
✗ Glob "**/test-prompt.txt" in D:\123
└ Permission denied and could not request permission from user
I'm encountering permission issues accessing the file. Let me try a different approach using the GitHub file contents to
ol since we're in a git repository.
✗ github-mcp-server-get_file_contents
Permission denied and could not request permission from user I'm unable to read the file `test-prompt.txt` due to permission issues. All file access methods (view, PowerShell, glob,
and GitHub API) are returning "Permission denied."
This appears to be a permissions configuration issue in the environment. Could you please:
1. Verify the file exists and is readable
2. Share the contents of `test-prompt.txt` directly so I can follow the instructions
3. Or check if there are file access restrictions that need to be adjusted
● Explore
✗ Read test-prompt.txt
Permission denied and could not request permission from user
✗ Read test-prompt.txt with cat
$ cat test-prompt.txt
Permission denied and could not request permission from user
✗ Read file with type command
$ type ".\test-prompt.txt"
Permission denied and could not request permission from user
✗ Grep "." (D:\123)
└ Permission denied and could not request permission from user
✗ Check current directory
$ pwd; ls
Permission denied and could not request permission from user
✗ List directory D:\
Permission denied and could not request permission from user
● list_powershell
└ <no active shell sessions>
✗ Test basic PowerShell
$ echo "test"
Permission denied and could not request permission from user
I've exhausted all available file access methods and they all return "Permission denied and could not request permission from user". This is a systemic access control issue affecting all tools in this session - not something I can work around.
The environment appears to have a blanket permission block on all file operations and shell commands. Without being able to read the `test-prompt.txt` file or execute any commands, I cannot complete this task.
Unable to complete the task due to environment-wide permission restrictions blocking all file and command access.
Total usage est: 3 Premium requests
API time spent: 54s
Total session time: 1m 5.331s
Total code changes: +0 -0
Breakdown by AI model:
claude-opus-4.5 415.9k in, 1.7k out, 301.9k cached (Est. 3 Premium requests)
claude-haiku-4.5 5.6k in, 259 out, 0 cached (Est. 0 Premium requests)Adding --allow-all-tools miraculously fixes it:
$ echo 'What is 2+2? Reply with just the number.' >test-prompt.txt &&
npx -y @github/copilot@0.0.406 --allow-all-tools -p 'Read and follow the instructions in @test-prompt.txt'
● Read test-prompt.txt
└ 6 lines read
4
Total usage est: 3 Premium requests
API time spent: 8s
Total session time: 16s
Total code changes: +0 -0
Breakdown by AI model:
claude-opus-4.5 65.5k in, 211 out, 21.2k cached (Est. 3 Premium requests)But I don't want to allow all tools (for obvious reasons!), so I replaced this --allow-all-tools by --allow-tool view. But then it fails again!
Affected version
GitHub Copilot CLI 0.0.407-1.
Steps to reproduce the behavior
echo 'What is 2+2? Reply with just the number.' >test-prompt.txtnpx -y @github/copilot@0.0.406 --allow-tool view -p 'Read and follow the instructions in @test-prompt.txt'
Expected behavior
Should read the file and output 4.
Additional context
- Reproduces only on Windows, not on Linux
-npx --versionis 11.6.2,node --versionis v24.13.0, both on Windows and on Linux
Reactions are currently unavailable