github / github/copilot-cli

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

Aberta
#701 0 comentários 0 reações 0 responsáveis Ver no GitHub
area:agents area:configuration area:permissions area:tools
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.