-
Notifications
You must be signed in to change notification settings - Fork 1.4k
--allow-tool='shell(docker ps)' doesn't work #2610
Copy link
Copy link
Open
Labels
area:permissionsTool approval, security boundaries, sandbox mode, and directory restrictionsTool approval, security boundaries, sandbox mode, and directory restrictionsarea:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behaviorBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
Metadata
Metadata
Assignees
Labels
area:permissionsTool approval, security boundaries, sandbox mode, and directory restrictionsTool approval, security boundaries, sandbox mode, and directory restrictionsarea:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behaviorBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
Type
Fields
Give feedbackNo fields configured for Bug.
Describe the bug
https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference#tool-permission-patterns - documentation mentions
shell(git push)as an example pattern for --allow-tool. This seems to imply that there's a flexible mechanism for allowing subcommands (we don't have to allow allgitcommands, we can pick specific subcommands likegit pushto allow).This does work for
git(I tested it withgit status) but doesn't work for other commands. For example:copilot --model gpt-5-mini --allow-tool='shell(docker ps)' -p 'Run this command in Bash: `docker ps`'This doesn't work. Same with
shell(docker ps:*)Affected version
GitHub Copilot CLI 1.0.21.
Steps to reproduce the behavior
copilot --model gpt-5-mini --allow-tool='shell(docker ps)' -p 'Run this command in Bash: `docker ps`'Expected behavior
Expected the
docker pscommand to be allowed to run, without asking for permissions. But instead seeing "Permission denied and could not request permission from user"Additional context
No response