Skip to content

Feature Request: Allow sub-agents to use the model specified in frontmatter/task() — add opt-out for the cost-multiplier guard #2758

Description

@Akhilkokani

Describe the feature or problem you'd like to solve

Allow sub-agents to use the model specified in their .agent.md frontmatter or task() call's model parameter, by adding an opt-out flag for the cost-multiplier guard that currently silently downgrades sub-agent models to the cheapest available model.

Proposed solution

Add a configuration flag (e.g., allowSubagentModelUpgrade: true in ~/.copilot/config.json or --allow-subagent-model-upgrade CLI flag) that lets users opt out of the cost-multiplier guard that silently downgrades sub-agent models.

Currently, when a session runs on a 0× model (e.g., GPT-4.1), every sub-agent model override — whether via model: frontmatter in .agent.md or the model parameter in task() calls — is silently downgraded to the session default. Process logs confirm:

Downgrading subagent model from "claude-sonnet-4.6" (1x) to session model "gpt-4.1" (0x).

This prevents a common and valuable pattern: tiered multi-agent orchestration — using a free model for routine tasks (reads, searches, navigation) while delegating complex work to premium models (Sonnet for code, Opus for architecture). Users who are aware of the cost implications and willing to spend their premium request budget should be able to opt in.

Example prompts or workflows

  1. Tiered delegation (primary use case):
    Session on GPT-4.1 (0×). User says "Review the architecture of this service." GPT-4.1 gathers context (free) then delegates to an advisor agent with model: claude-opus-4.6 (3×). Today: advisor runs on GPT-4.1. Expected: advisor runs on Opus.

  2. Custom agent model enforcement:
    .agent.md with model: claude-sonnet-4.6 in frontmatter. When invoked as a sub-agent from a free session, the frontmatter model should be honored. Today: silently downgraded.

  3. Cost-conscious exploration + quality implementation:
    User navigates codebase with GPT-4.1 (free), then delegates "Write tests for this component" to a specialist agent with model: claude-sonnet-4.6. Today: tests written by GPT-4.1. Expected: tests written by Sonnet.

  4. Plugin agents with model requirements:
    A plugin author distributes agents that require specific models for quality (e.g., a code reviewer that needs Opus). Today: the model requirement is ignored. Expected: honored when the user opts in.

  5. Budget-aware workflows:
    Combined with /usage, users can monitor spend and make informed decisions about when to invoke premium sub-agents vs. stay on the free tier.

Additional context

Evidence

  • Confirmed behavior via process logs: Downgrading subagent model from "claude-sonnet-4.6" (1x) to session model "gpt-4.1" (0x) — tested on v1.0.28
  • Workaround exists but loses features: Spawning separate copilot --agent X --model Y -p "..." processes bypasses the guard (each is a top-level session), but loses session integration: shared context, multi-turn refinement, streaming, /tasks, /diff tracking
  • Sonnet session workaround is partial: Setting session to Sonnet (1×) avoids the guard for ≤1× sub-agents, but costs 1× for every prompt including simple reads

Related issues

Suggested configuration shapes

// ~/.copilot/config.json
{ "allowSubagentModelUpgrade": true }
# CLI flag
copilot --allow-subagent-model-upgrade
# Per-agent frontmatter (most granular)
---
model: claude-opus-4.6
force-model: true
---

Activity

  1. added
    area:agents
    area:models
    on Apr 16, 2026
  2. faulkdev commented on Apr 29, 2026

    @faulkdev

    As GitHub moves to token-based pricing, GitHub must add these features to keep users.

  3. trueIoV commented on May 4, 2026

    @trueIoV

    Need this.

  4. Rogalek commented on May 19, 2026

    @Rogalek

    Hey, any update on this? Running into the exact same problem with a real use case.

    Adding a concrete real-world use case: multi-model skill pipelines.

    I maintain a custom skill (/orchestrate) that delegates different pipeline phases to specialized sub-agents — architect, reviewer, tester, developer — each with a model requirement in SKILL.md:

    Agent Intended model Reason
    orch-architect claude-opus-4.7 Architecture decisions, design quality
    orch-reviewer gpt-5.5 High-quality code review
    orch-tester / orch-developer gpt-5.3-codex Fast code execution

    With session on claude-sonnet-4.6, I tested all three approaches:

    • model= parameter in task() → ❌ silently ignored for premium models (opus, gpt-5.5), ✅ works for standard (gpt-5.3-codex)
    • model: in .agent.md frontmatter → ❌ also ignored, agent runs on session model

    The result is that skill-defined model routing — a core feature for anyone building multi-agent workflows — simply doesn't work. This effectively makes skills single-model pipelines, which defeats the purpose of having agent specialization.

    The force-model: true frontmatter suggestion from the original issue seems like the right solution: explicit opt-in per-agent, respects cost awareness, works without changing global config.

  5. lrogowski-evertz commented on May 20, 2026

    @lrogowski-evertz

    Need this! ASAP!

  6. pawelw-evertz commented on May 20, 2026

    @pawelw-evertz

    that's highly desired fix

  7. devdnn commented on May 26, 2026

    @devdnn

    Please implement this, I followed the same steps as https://youtu.be/rJSsbHwkYAY?si=4_f0UmT9AaTR5XP1 but the copilot-cli doesn't follow the subagent model specified in the frontmatter.

    Even using the costliest model in the orchestrator its not working.

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

    area:agentsarea:models

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions