Task tool ignores model parameter, always defaults to Opus regardless of configuration

Resolved 💬 3 comments Opened Nov 21, 2025 by mishaal79 Closed Nov 24, 2025

Bug Description

The Task tool's model parameter is being ignored. All agent invocations default to Opus regardless of explicitly specified model configuration, blocking users who have Opus rate limits but available Sonnet capacity.

Steps to Reproduce

  1. Have Opus weekly rate limit reached
  2. Have available Sonnet capacity
  3. Try using Task tool with explicit Sonnet model:
Task(
    subagent_type='Plan',
    model='sonnet',  # Explicitly request Sonnet
    description='...',
    prompt='...'
)
  1. Also try specialized Sonnet agents:
Task(subagent_type='Explore', ...)  # Should use Sonnet by default

Expected Behavior

  • Task(..., model='sonnet') should use Claude Sonnet 4.5
  • Task(subagent_type='Explore') should use Sonnet (per agent description)
  • Only fall back to Opus when explicitly requested or when subagent requires it

Actual Behavior

All Task tool invocations fail with:

Opus weekly limit reached ∙ resets Nov 24 at 9pm

Even when:

  • model='sonnet' explicitly specified
  • Using agents documented as Sonnet-based (Explore, devx-sonnet, etc.)
  • User has available Sonnet API capacity

Impact

Critical usability issue:

  • Users with Opus rate limits cannot use ANY agents
  • Even when they have Sonnet capacity available
  • No graceful fallback or model selection works
  • Makes agent system completely unusable during Opus rate limit periods

Evidence from Debug Logs

2025-11-21T05:31:55.653Z [DEBUG] Getting matching hook commands for SubagentStart with query: Plan
2025-11-21T05:31:56.065Z [ERROR] Error streaming, falling back to non-streaming mode: 429 {"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your account's rate limit. Please try again later."},"request_id":"req_011CVLVCh3bRNJYXVpwV8fAy"}

Despite model='sonnet' being specified in the Task call.

Environment

  • Claude Code Version: 2.0.45 (native macOS)
  • OS: macOS Darwin 24.6.0
  • Account Status: Opus weekly limit reached, Sonnet capacity available
  • Affected Tools: All Task tool invocations (all subagent_type values)

Workaround

None available. Users must:

  • Wait for Opus rate limit reset, OR
  • Use direct tool calls instead of agents (losing agent capabilities)

Suggested Fix

  1. Respect model parameter: Honor the model parameter in Task tool calls
  2. Graceful fallback: Auto-retry with Sonnet when Opus limit hit (if user has Sonnet capacity)
  3. Better error messages: Indicate which model was attempted and suggest alternatives
  4. Model defaults: Document which agents use which models by default

Related

This affects all specialized agents that should use non-Opus models:

  • devx-sonnet - documented as "Sonnet 4.5 optimized"
  • devx-haiku - documented as "Haiku optimized"
  • tshootx-sonnet - documented as "Sonnet 4.5 optimized"
  • Explore - should use Sonnet for fast exploration

All currently fail with Opus limit errors despite their names/descriptions.

View original on GitHub ↗

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