github / github/copilot-cli

Title: Tool restriction priority between copilot-instructions.md and AGENTS.md

未关闭
#701 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:agents area:configuration area:permissions area:tools
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the feature or problem you'd like to solve

I observed unexpected behavior with tool restrictions when using custom agents.

### Proposed solution

Expected behavior:
When using @readonly-agent (defined in AGENTS.md with only view/read tools allowed),
I expected all modification operations (str_replace, create, delete) to be blocked.

Actual behavior:
The agent was able to execute str_replace, create, and powershell commands
despite AGENTS.md specifying only view/read tools.

Questions:
1. What is the priority order between .github/copilot-instructions.md and AGENTS.md
for tool permissions?
2. Can AGENTS.md restrict/deny tools that are allowed in copilot-instructions.md?
3. What is the intended behavior for tool restriction inheritance?

Environment:
- GitHub Copilot CLI version: 0.0.349
- Custom agent defined in AGENTS.md
- Tool restrictions specified in agent definition

### Example prompts or workflows

_No response_

### Additional context

_No response_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。