Skip to content

Support discovering .github/agents/*.agent.md via enableConfigDiscovery #1080

@tbrand

Description

@tbrand

Summary

When using the GitHub Copilot SDK with:

createSession({
  enableConfigDiscovery: true
})

workspace Skills and MCP configurations can be discovered automatically.
However, custom agents defined under: .github/agents/*.agent.md are not discovered or loaded by the SDK.

Context

It is currently possible to support these agents manually by:

  • globbing .github/agents/**/*.agent.md
  • parsing YAML frontmatter
  • mapping fields to customAgents
  • passing them into createSession(...)

While this works, it introduces extra implementation that wouldn't be necessary if agent discovery was handled by enableConfigDiscovery.

Feature Request

Extend enableConfigDiscovery to also discover agents defined in: .github/agents/*.agent.md and automatically register them as SDK customAgents during session creation. This would make it easier to:

  • reuse agents authored for VS Code Copilot Agent Mode
  • share the same agent definitions between IDE and SDK usage
  • avoid implementing custom .agent.md loaders in applications

Having this handled by config discovery would make integrating multi-agent workflows via the SDK much simpler.

Thanks for considering this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions