github / github/copilot-cli

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

オープン
#3,133 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
area:agents area:permissions
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

task tool のパラメータ処理と、sub-agents の tool 呼び出しをディスパッチするランタイムパスから開始し、general-purpose エージェントと explore エージェントがどのように tool へのアクセスを受け取るかを比較します。完了条件は、オプションの allowed_tools または blocked_tools 設定が尊重され、ブロックされた呼び出しが MCP server に到達する前に拒否されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
cli, security
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。