[BUG] Task tool model parameter silently ignored for team agents - inherits parent model

Resolved 💬 3 comments Opened Feb 9, 2026 by mriffault Closed Feb 9, 2026

Bug Description

When spawning a teammate agent via the Task tool with an explicit model: "sonnet" parameter inside a team context (created with TeamCreate), the agent silently ignores the model parameter and runs under the parent's model instead (Opus 4.6 in this case).

There is no error, no 404, no warning -- the parameter is simply ignored. This is different from #18873 where the model parameter causes API 404 errors.

Reproduction Steps

  1. Start a Claude Code session running on Opus 4.6 (claude-opus-4-6)
  2. Create a team:

``
TeamCreate({ team_name: "test-model" })
``

  1. Spawn a teammate with explicit model: "sonnet":

``
Task({
subagent_type: "general-purpose",
model: "sonnet",
name: "test-agent",
team_name: "test-model",
prompt: "What is your exact model ID? Reply with the model name from your system prompt."
})
``

  1. The agent responds: "Claude Opus 4.6, model ID: claude-opus-4-6"

Expected Behavior

The agent should run under Sonnet 4.5 (claude-sonnet-4-5-20250929) as specified by the model: "sonnet" parameter.

Actual Behavior

The agent runs under Opus 4.6 (claude-opus-4-6), inheriting the parent's model. The model parameter is silently ignored with no error or warning.

Impact

  • Cost: Opus is significantly more expensive than Sonnet. When spawning 5+ agents for batch processing, this means 5-10x unnecessary spending.
  • Silent failure: Unlike #18873 which at least throws a 404, this silently uses the wrong model, making it very hard to detect.
  • Documented feature not working: The Task tool description explicitly lists model as a parameter with enum values ["sonnet", "opus", "haiku"], implying it should work.

Environment

  • Claude Code version: 2.1.37
  • Parent model: claude-opus-4-6
  • Platform: Linux (WSL2) 6.6.87.2-microsoft-standard-WSL2
  • Context: Team agents spawned via TeamCreate + Task with team_name

Related Issues

  • #18873 (open) - model parameter returns 404 (different symptom, same root cause?)
  • #5456 (closed) - Sub-agents don't inherit model configuration
  • #11682 (closed) - Task tool model parameter causes API 404 error
  • #8932 - general-purpose agent sets model as 'sonnet' rather than 'inherit'

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗