Skip to content

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

Description

@Omzig

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions