Describe the bug
When using the PowerShell tool to run gh commands that contain strings starting with /, the CLI appears to misinterpret them as filesystem paths and prompts for directory permission.
Steps to reproduce
- Try to run a
gh pr comment command with a body starting with /:
gh pr comment 33727 --body "/azp run"
-
The tool call gets rejected with a message suggesting permission was requested for a directory
-
Similarly happens with /cc @username at the end of an issue body
Expected behavior
The CLI should recognize that /azp run is a string argument to --body, not a filesystem path, and execute the command without permission prompts.
Actual behavior
The tool call is rejected. The user sees a permission prompt that appears to be asking about accessing a /azp or /cc directory.
Environment
- OS: Windows 11
- Copilot CLI version: 0.0.397
Additional context
This occurred while trying to:
- Create a GitHub issue with
/cc @jonathanpeppers at the end of the body
- Comment
/azp run on a PR to trigger Azure Pipelines
Both cases were rejected, likely because the / prefix was being parsed as a path.
Describe the bug
When using the PowerShell tool to run
ghcommands that contain strings starting with/, the CLI appears to misinterpret them as filesystem paths and prompts for directory permission.Steps to reproduce
gh pr commentcommand with a body starting with/:The tool call gets rejected with a message suggesting permission was requested for a directory
Similarly happens with
/cc @usernameat the end of an issue bodyExpected behavior
The CLI should recognize that
/azp runis a string argument to--body, not a filesystem path, and execute the command without permission prompts.Actual behavior
The tool call is rejected. The user sees a permission prompt that appears to be asking about accessing a
/azpor/ccdirectory.Environment
Additional context
This occurred while trying to:
/cc @jonathanpeppersat the end of the body/azp runon a PR to trigger Azure PipelinesBoth cases were rejected, likely because the
/prefix was being parsed as a path.