copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

subagent permission approval lacks context and is confusing

Open tdihp opened this issue 5 months ago • 1 comments

Describe the bug

Linux subagents can run commands that the permission pattern only captures "/" as the directory which is super dangerous, without giving me the exact command will be run and context around it like a regular agent.

Affected version

No response

Steps to reproduce the behavior

  1. run copilot-cli
  2. ask it to run a command in subagent that require additional permission
  3. find that permission itself got prompted, but reasoning/context isn't

Expected behavior

I should be able to see which agent and its full glory

Additional context

No response

tdihp avatar Jun 05 '26 02:06 tdihp

A subagent approval should show the same normalized execution envelope as the parent: subagent identity and purpose, exact executable and arguments, canonical cwd, requested filesystem or network scope, and the policy rule that caused the prompt. Showing only slash is dangerously broad and not reviewable. Approval should bind to that envelope, not to a textual directory fragment. If normalization cannot recover the full command, the safe action is deny or return control to the parent.

BGMLAI avatar Jul 14 '26 00:07 BGMLAI