Describe the bug
Environment
- Copilot CLI 1.0.86-0, 1.0.89-3 and 1.0.89 on Windows 11. Windows long paths
are enabled (LongPathsEnabled = 1).
- Non-interactive child process, roughly:
copilot -C --no-ask-user --no-custom-instructions --disable-builtin-mcps
--available-tools=view,rg,glob --deny-tool=write --deny-tool=shell
--output-format=json (prompt supplied non-interactively)
Steps to reproduce
- Create a directory D. Inside it, create file F whose full path is 257 or more
characters, and file G whose full path is 256 characters or fewer.
- Run the CLI non-interactively with
-C D --no-ask-user and ask it to view F and G.
Actual
view of G succeeds.
view of F fails with: "Permission denied and could not request permission from user".
rg over D still returns matching lines from F, so the file itself is readable.
Expected
- F is inside the allowed working directory, so
view should succeed.
- If there is a path-length limit, the error should say so, rather than report
a permission problem.
Evidence (production runs, 2026-09-23 to 2026-10-06)
- 227
view calls across 7 sessions. All 218 successful reads had paths of 256
characters or fewer. All 7 denied reads of real files inside the -C directory
had paths of 257-264 characters.
- The same files were denied consistently across sessions.
- Windows long paths are enabled, so the operating system is not the cause.
Impact
- In unattended runs the agent cannot ask for permission, so it silently
continues without the file. The error message points to permissions, not
path length, which makes the cause hard to find.
Note
- These observations come from real unattended runs; I have not yet run a
controlled minimal repro. Not checked: whether an interactive session
prompts instead of denying, and whether glob is affected.
Affected version
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
Additional context
No response
Describe the bug
Environment
are enabled (LongPathsEnabled = 1).
copilot -C --no-ask-user --no-custom-instructions --disable-builtin-mcps
--available-tools=view,rg,glob --deny-tool=write --deny-tool=shell
--output-format=json (prompt supplied non-interactively)
Steps to reproduce
characters, and file G whose full path is 256 characters or fewer.
-C D --no-ask-userand ask it to view F and G.Actual
viewof G succeeds.viewof F fails with: "Permission denied and could not request permission from user".rgover D still returns matching lines from F, so the file itself is readable.Expected
viewshould succeed.a permission problem.
Evidence (production runs, 2026-09-23 to 2026-10-06)
viewcalls across 7 sessions. All 218 successful reads had paths of 256characters or fewer. All 7 denied reads of real files inside the -C directory
had paths of 257-264 characters.
Impact
continues without the file. The error message points to permissions, not
path length, which makes the cause hard to find.
Note
controlled minimal repro. Not checked: whether an interactive session
prompts instead of denying, and whether
globis affected.Affected version
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
Additional context
No response