Add support for blocked_tools / allowed_tools for Copilot CLI task tool sub-agents
- Lingua principale
- Shell
- Stelle
- 11.2k
- Fork
- 1.9k
- Merge medio
- 14h 16m
- PR unite (30g)
- 6
Descrizione
### Describe the feature or problem you'd like to solve
When launching sub-agents via the "task" tool, there's no way to restrict which tools the agent can access. I run a multi-model PR review skill that launches parallel general-purpose agents to review ADO PRs. These agents need ADO read tools to fetch diffs, but should never call write tools like repo_pull_request_thread_write. Despite strong prompt instructions (boxed warnings, banned tool lists, repeated reminders), agents occasionally post full review comments directly to PRs under my identity without authorization. This happened on 4 PRs before I caught it.
### Proposed solution
Add optional blocked_tools and/or allowed_tools parameters to the task tool:
agent_type: general-purpose
mode: background
blocked_tools: ["repo_pull_request_thread_write", "repo_pull_request_write"]
The runtime would reject blocked tool calls before they reach the MCP server. Text-only instructions aren't reliable -- LLMs sometimes override them. The explore agent type removes all MCP tools, but that's too restrictive (loses read access too). There's no middle ground today.
### Example prompts or workflows
_No response_
### Additional context
_No response_
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dalla gestione dei parametri di task tool e dal percorso di runtime che distribuisce le chiamate agli strumenti dei sub-agents; confronta il modo in cui gli agenti general-purpose ed explore ricevono l’accesso agli strumenti. Il lavoro è completo quando vengono rispettate le impostazioni opzionali allowed_tools o blocked_tools e le chiamate bloccate vengono rifiutate prima di raggiungere il MCP server.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- shell
- Ambito
- cli, security
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100