github / github/copilot-cli

Nested agents load ALL copilot-instructions.md, not just the ones at the nested level

Aberta
#2,735 1 comentário 0 reações 0 responsáveis Ver no GitHub
area:agents area:context-memory
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

### Describe the bug

This feature was added: https://github.com/github/copilot-cli/issues/1655

However, whilst nested agents are now dispalyed, they read the `copilot-instructions.md` at ALL levels.

This is not expected behavior because it should be assumed that nested folders are sub-projects / workspaces in their own right

Solutions:
- Default to only read the copilot-instructions.md at the same level in a nested hierarchy
- Add a boolean setting to turn this behavior on / off as needed, defaulted to off

### Affected version

_No response_

### Steps to reproduce the behavior

create:
- .github/copilot-instructions.md
- nested_folder/.github/agents/test-agent.md
- nested_folder/.github/copilot-instructions.md

ask the test-agent.md to link the absolute path to all of the instructions in its context window & memory and it will link both:

Image

### Expected behavior

it should be assumed that nested folders are sub-projects / workspaces in their own right. therefore it shouldn't be loading in content that's outside the view and/or control of the hierarchy

### Additional context

_No response_

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start by reproducing the issue with .github/copilot-instructions.md, nested_folder/.github/agents/test-agent.md, and nested_folder/.github/copilot-instructions.md. Trace the nested-agent instruction discovery entry point and any existing tests for instruction loading; done means the nested agent uses only the instruction file at its own level by default, without loading the parent file.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
shell
Domínio
cli
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
55/100

Receba novas issues na sua caixa de entrada

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