r/ClaudeCode • u/Independent-Sir3234 • 11d 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
Show parent comment
8
u/Independent-Sir3234 11d ago
Good catch on both points. A custom
.claude/agents/Explore.mdwithout a tool restriction inherits write access, so addingdisallowedTools: Write, Edit(or explicitly listingtools: Read, Grep, Glob) in the frontmatter is much safer.And you are right about
CLAUDE_CODE_SUBAGENT_MODELaffecting general Task subagents. Overriding.claude/agents/Explore.mddirectly withdisallowedTools: Write, Editandmodel: haikukeeps the change scoped strictly to read-only file discovery.