github / github/copilot-cli

Add support for blocked_tools / allowed_tools for Copilot CLI task tool sub-agents

Offen
#3,133 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
area:agents area:permissions
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

### 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_

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne bei der Parameterbehandlung des task tool und dem Laufzeitpfad, der tool-Aufrufe von sub-agents weiterleitet; vergleiche, wie general-purpose- und explore-Agents Tool-Zugriff erhalten. Als abgeschlossen gilt die Aufgabe, wenn optionale Einstellungen für allowed_tools oder blocked_tools berücksichtigt werden und blockierte Aufrufe abgewiesen werden, bevor sie den MCP server erreichen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
shell
Bereich
cli, security
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.