github / github/copilot-cli

Bug: /agent pop-up treats .github\agents\AGENTS.md as a custom agent

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

描述

### Describe the bug

The `/agent` pop-up incorrectly attempts to load a repository guidance file at `.github\agents\AGENTS.md` as a custom agent definition. It then reports a malformed custom-agent frontmatter error, even though `AGENTS.md` is documented as repository instructions at https://agents.md/ and is not intended to be a custom agent file.

Observed output:

```text
Custom Agents

The following agents failed to load:
✖ .github\agents\AGENTS.md: custom agent markdown frontmatter is malformed: missing or malformed YAML frontmatter
```

### Affected version

Unknown; please determine from the report metadata.

### Steps to reproduce the behavior

1. Add or use a repository guidance file at `.github\agents\AGENTS.md` following the `AGENTS.md` documentation at https://agents.md/.
2. Start Copilot CLI in the repository.
3. Open the `/agent` pop-up.
4. Observe that the file is discovered as a custom agent and fails frontmatter validation.

### Expected behavior

The `/agent` pop-up should distinguish repository instruction files such as `AGENTS.md` from custom agent definitions. It should not try to parse a documented `AGENTS.md` file as a custom agent or report a frontmatter error for it.

### Additional context

- Platform: Windows
- The error is shown in the `/agent` pop-up.
- Documentation referenced: https://agents.md/
- The path is displayed with Windows separators: `.github\agents\AGENTS.md`.

貢獻指南

開啟貢獻指南

研究方向

從 /agent 彈出視窗的自訂代理程式探索與 frontmatter 驗證流程著手,在 Windows 上使用 .github\agents\AGENTS.md 重現該報告。完成的標準是:儲存庫指示檔案能與自訂代理程式區分開,不會被解析為自訂代理程式,且不會出現 frontmatter 格式錯誤,同時自訂代理程式仍可被探索。

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

評估

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

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

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