Task tool subagents fail with 404 'model: haiku' regardless of model parameter
Resolved 💬 3 comments Opened Jan 3, 2026 by cifeaux Closed Jan 6, 2026
Bug Description
All Task tool subagent invocations fail with a 404 error for model "haiku", even when explicitly specifying a different model.
Environment
- Claude Code version: 2.0.76
- Platform: macOS Darwin 24.6.0
- Main session model: claude-opus-4-5-20251101 (works fine)
Reproduction
Any Task tool invocation fails:
# Attempt 1: deep agent (has custom definition with model: opus)
Task(subagent_type="deep", prompt="test")
→ API Error: 404 {"type":"error","error":{"type":"not_found_error","message":"model: haiku"}}
# Attempt 2: deep agent with explicit model parameter
Task(subagent_type="deep", model="opus", prompt="test")
→ API Error: 404 {"type":"error","error":{"type":"not_found_error","message":"model: haiku"}}
# Attempt 3: Explore agent
Task(subagent_type="Explore", prompt="test")
→ API Error: 404 {"type":"error","error":{"type":"not_found_error","message":"model: haiku"}}
# Attempt 4: general-purpose agent
Task(subagent_type="general-purpose", prompt="test")
→ API Error: 404 {"type":"error","error":{"type":"not_found_error","message":"model: haiku"}}
Custom Agent Definition
User has ~/.claude/agents/deep.md with:
---
name: deep
model: opus
tools: Read, Glob, Grep, Bash, WebSearch, WebFetch
---
Expected Behavior
- Subagents should use the model specified in the agent definition or model parameter
- If "haiku" isn't available, should fall back gracefully or use an available model
Actual Behavior
- All subagents attempt to use "haiku" regardless of configuration
- The model parameter passed to Task tool is ignored
- Custom agent definitions with explicit model settings are ignored
- Results in 404 error, completely breaking subagent functionality
Suspected Cause
Claude Code appears to have hardcoded "haiku" somewhere in the subagent spawning logic, bypassing both:
- The
modelparameter on the Task tool - The
modelfield in custom agent definitions
The "haiku" shorthand may also not be resolving to a valid full model ID.
---
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗