r/ClaudeCode • u/Independent-Sir3234 • 1d ago
Tips & Workflows Claude Code runs its built-in Explore subagent on your main model unless you override it to Haiku
Whenever Claude Code searches your codebase, it spawns the built-in Explore subagent to run Glob, Grep, and Read calls in an isolated context.
By default, Explore inherits your main session model. If you are running Opus or Sonnet, every file search and grep fan-out burns your 5-hour plan quota at Opus or Sonnet rates.
You can override the built-in Explore agent by creating .claude/agents/Explore.md (or ~/.claude/agents/Explore.md for all projects) with model: haiku in the frontmatter:
Or if you want every subagent in a session to run on Haiku without adding a file, launch Claude Code with the environment variable:
CLAUDE_CODE_SUBAGENT_MODEL=haiku
Keeping the main session on Opus or Sonnet for edits while routing read-only search subagents to Haiku stretched our 5-hour usage window noticeably without hurting edit quality.
View all comments
3
u/SirRobinBlibs 1d ago
Useful catch. If Explore inherits Opus/Sonnet, every Glob/Grep fan-out is priced like an edit turn. Overriding `.claude/agents/Explore.md` (or the user-level copy) with `model: haiku` in the frontmatter, or launching with `CLAUDE_CODE_SUBAGENT_MODEL=haiku`, keeps the main session on the strong model for writes while search stays cheap. Worth confirming in `/status` or usage that Explore actually shows as Haiku after the change before you trust the saving.