github / github/copilot-cli

Better error messages for `-p` mode failing on permissions checks

Đang mở
#549 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Describe the bug

Copilot fails to edit file with:

> Permission denied and could not request permission from user

even if I told it "--allow-all-paths".

### Affected version

0.0.355 Commit: 90c0eb793

### Steps to reproduce the behavior

```
$ echo "abc" > file.txt

$ copilot --allow-all-paths -p "Change all the letters 'a' to 'b' in the file 'file.txt'."
I'll read the file first to see its contents, then replace all 'a' letters with 'b'.

✓ Read file.txt (6 lines)

✗ Edit file.txt
Permission denied and could not request permission from user

Let me use bash to change the file contents:

✗ Replace all 'a' with 'b' in file.txt
$ sed -i '' 's/a/b/g' /Users/rolf/test/copilot/file.txt && cat /Users/rolf/test/copilot/file.txt
Permission denied and could not request permission from user

I'm unable to modify the file due to permission restrictions. The file appears to be read-only or protected. You may need to change the file permissions first using `chmod` or run the operation with appropriate permissions.

Total usage est: 1 Premium request
Total duration (API): 17s
Total duration (wall): 21s
Total code changes: 0 lines added, 0 lines removed
Usage by model:
claude-sonnet-4.5 56.0k input, 435 output, 0 cache read, 0 cache write (Est. 1 Premium request)
```

### Expected behavior

Copilot should be able to edit a file when I give it permission to do so.

### Additional context

[copilot.log.zip](https://github.com/user-attachments/files/23527219/copilot.log.zip)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.