github / github/app

When a repository custom agent invokes another custom agent as a subagent, the invoked agent does not use the `model` declared in its `.agent.md`.

Open
#3,775 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
No language data
Stars
2.1k
Forks
157
PR merge metrics
No merged PRs in 30d

Description

Short summary

When a repository custom agent invokes another custom agent as a subagent, the invoked agent does not use the model declared in its .agent.md.

Affected version or release

1.1.19

Installation context
  • GitHub Copilot App: 1.1.19
  • Bundled Copilot CLI: 1.0.84-4
  • OS: Windows 11, x86_64
  • Workspace type: local Git worktree
What happened?

When a repository custom agent invokes another custom agent as a subagent, the invoked agent does not use the model declared in its .agent.md.

Instead, every subagent runs with the model selected for the parent session. In my case, the parent uses gpt-5.6-sol, and all delegated agents also use gpt-5.6-sol despite specifying different models.

The custom agent configuration reference states:

model: Model to use when this custom agent executes. If unset, inherits the default model.

Based on this contract, I expect the invoked agent's configured model to be used unless the caller explicitly supplies a model override.

The behavior was also observed with:

  • GitHub Copilot App: 1.1.17
  • Bundled Copilot CLI: 1.0.83
Steps to reproduce
  1. Add the two profiles above under .github/agents/.
  2. Start a session using the orchestrator custom agent.
  3. Ask the orchestrator to invoke researcher which has model: "claude-sonnet-5".
  4. Inspect the model shown for the delegated execution or inspect session usage data.
  5. Observe that the researcher execution uses gpt-5.6-sol, not claude-sonnet-5.
Expected behavior

The delegated researcher execution uses claude-sonnet-5, as declared in YAML:

model: "claude-sonnet-5"

Additional context
Impact

This prevents repository-defined multi-agent workflows from assigning models according to each role. It also makes the documented model property ineffective for programmatically invoked agents.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the two custom agent profiles under .github/agents/, especially the orchestrator and researcher definitions, and reproduce the delegation using the reported Copilot App and CLI versions. Inspect the delegated execution or session usage data to compare the selected model with researcher’s model declaration. Done means the researcher execution uses its declared model unless the caller explicitly overrides it.

Written by the indexing model from the issue text.

Assessment

Tech stack
github
Domain
ai, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.