Add support for blocked_tools / allowed_tools for Copilot CLI task tool sub-agents
- Lenguaje dominante
- Shell
- Estrellas
- 11.2k
- Forks
- 1.9k
- Merge medio
- 14 h 16 min
- PR fusionados (30 d)
- 6
Descripción
### 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_
Guía de contribución
Línea de trabajo
Comienza por el manejo de parámetros de task tool y la ruta de ejecución que despacha las llamadas a herramientas de sub-agents; compara cómo los agentes general-purpose y explore reciben acceso a las herramientas. Se considera terminado cuando se respetan las configuraciones opcionales allowed_tools o blocked_tools y las llamadas bloqueadas se rechazan antes de llegar al MCP server.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- shell
- Área
- cli, security
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100