Skip to content

Custom subagent model allowlist/order is ignored; subagents run on Claude Sonnet 4.6 even when Sonnet is not in the configured model list #316133

@Mirabis

Description

@Mirabis
  • Copilot Chat Extension Version: 0.47.1 bundled with VS Code Stable
  • VS Code Version: 1.119.1
  • OS Version: macOS 26.4.1 (25E253)
  • Feature (e.g. agent/edit/ask mode): Agent mode / custom subagents (runSubagent)
  • Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): Parent session started on GPT-5.5 (copilot)
  • Logs: Attached copilot_subagent_model_selection_structural_2026-05-12.json (redacted/scrubbed)

copilot_subagent_model_selection_structural_2026-05-12.json

I’m seeing custom subagents run on Claude Sonnet 4.6 even when that model is not present in the subagent’s configured model: list.

I expected VS Code Copilot custom agents/subagents to honor the configured model priority/allowlist, or at minimum not select a model that is absent from the list.

Observed behavior:

  • Parent session is started on GPT-5.5 (copilot).
  • Custom subagents are configured with model lists that do not include Claude Sonnet 4.6.
  • Despite that, the runtime repeatedly executes those subagents with claude-sonnet-4.6.

Examples from the attached exported prompt log:

  • Planner prompt export includes an explicit requested model of gpt-5.5 in the subagent invocation.
  • tool/runSubagent-Researcher requests are recorded with metadata.model = "claude-sonnet-4.6".
  • tool/runSubagent-Coder requests are also recorded with metadata.model = "claude-sonnet-4.6".

Configured agent examples:

Planner.agent.md

model: [GPT-5.5 (copilot), Claude Opus 4.7 (copilot), GPT-5.4 (copilot), GPT-5.2 (copilot)]

Researcher.agent.md

model: [Claude Opus 4.7 (copilot), GPT-5.5 (copilot), GPT-5.4 (copilot), GPT-5.3-Codex (copilot)]

In all of these cases, Claude Sonnet 4.6 is not configured, but the runtime still selects it.

Steps to Reproduce:

  1. Create custom agents/subagents with explicit model: lists that do not include Claude Sonnet 4.6, for example:
    • Planner: [GPT-5.5, Claude Opus 4.7, GPT-5.2, GPT-5.4]
    • Researcher: [GPT-5.5, Claude Opus 4.7, GPT-5.4, GPT-5.2]
    • Coder: [Claude Opus 4.7, GPT-5.5, GPT-5.4, GPT-5.3-Codex]
  2. Start the parent Copilot agent session with GPT-5.5 (copilot).
  3. Have the parent agent invoke these subagents via agent mode / runSubagent.
  4. Observe that the subagent UI/logs show Claude Sonnet 4.6 being used instead of one of the configured models.
  5. Export prompts/logs and inspect the recorded subagent request metadata.

Expected behaviour:

  • Subagent model resolution should follow the configured model: list in order, or fail gracefully.
  • If a configured model is unavailable, fallback should stay within the configured list.
  • A model not present in the subagent’s model: list should not be selected.

Actual behaviour: Subagents run on Claude Sonnet 4.6 even though it is not present in the configured model: list.

This looks like the runtime is bypassing the configured custom-agent model allowlist/order during subagent resolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    chat-ext-issueTriaging assistance tag. Automatically applied if an issue comes from the chat oss repo.new releaseIssues found in a recent release of VS Code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions