github / github/copilot-cli

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

未關閉
#2,735 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area:agents area:context-memory
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

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

貢獻指南

開啟貢獻指南

研究方向

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.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell
領域
cli
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。