Add support for blocked_tools / allowed_tools for Copilot CLI task tool sub-agents
- Langage dominant
- Shell
- Étoiles
- 11.2k
- Forks
- 1.9k
- Merge moyen
- 14 h 16 min
- PR mergées (30 j)
- 6
Description
### 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_
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la gestion des paramètres de task tool et le chemin d’exécution qui distribue les appels d’outils des sub-agents ; comparez la façon dont les agents general-purpose et explore reçoivent l’accès aux outils. La tâche est terminée lorsque les paramètres facultatifs allowed_tools ou blocked_tools sont respectés et que les appels bloqués sont rejetés avant d’atteindre le MCP server.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- shell
- Domaine
- cli, security
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100