Skip to content

Report the resolved definition path (and content hash) for each custom agent #4956

Description

@JereStay-MSFT

Describe the feature or problem you'd like to solve

session.custom_agents_updated reports source: "project" for an agent, but not which file it came from. When several definitions could supply an agent ID (repo, user, plugin, --add-dir), the caller can't confirm which one actually loaded. Nor can it confirm that the loaded file is the one it reviewed. This matters for teams that review agent definitions before trusting an automated run.

Proposed solution

Add the resolved definition's absolute path and a content hash (for example, SHA-256) to each agent entry in session.custom_agents_updated. The same data could go in the debug log next to tools_available.

Example prompts or workflows

A pipeline runs copilot --agent implementer -p .... Before trusting the run, it checks that implementer resolved to .github/agents/implementer.agent.md with the reviewed hash. If a same-ID definition elsewhere took precedence, the pipeline refuses the run.

Additional context

Copilot CLI 1.0.87-0, Windows. The only read-back we have today is tools_available. It shows what an agent was offered, but not why.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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