Explore agent defaults to Haiku, overflows with real-world MCP setups
Problem
The built-in Explore agent defaults to model: "haiku". With a realistic set of MCP servers and plugins installed, the system prompt (MCP tool definitions, skill listings, plugin agent types, etc.) exceeds Haiku's prompt size limit, causing every Explore agent spawn to fail with "Prompt is too long."
Environment
- Claude Code 2.1.96
- ~200 MCP tools from 10+ servers (Supabase, Sentry, Slack, Stripe, Monday, Zoho, Vercel, Gmail, Playwright, Chrome DevTools, Context7)
- 19 enabled plugins contributing skills and agent types
Reproduction
With the above environment, any Agent({ subagent_type: "Explore", prompt: "..." }) call fails with "Prompt is too long."
Testing
| Agent Type | Model | Result |
|-----------|-------|--------|
| general-purpose | opus (inherited) | Works |
| Explore | haiku (default) | Fails |
| Explore | opus (override) | Fails |
| Explore | sonnet (override) | Works |
Two issues
- Explore should default to Sonnet (or inherit). Haiku can't handle real-world MCP tool surface area. The Explore agent already sets
omitClaudeMd: trueto save space, but the MCP tool definitions alone overflow Haiku.
- Model override should be respected by prompt size validation. When
model: "opus"is specified, the agent still fails — suggesting the size check uses the agent type's default model limits, not the overridden model's limits.
Workaround
Using Agent({ subagent_type: "Explore", model: "sonnet", prompt: "..." }) works.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗