Most of what Claude Code does in a session isn't hard thinking. It's searching for where something lives, reading a long file to find two facts, and running tests to see what failed. If all of that happens in your main conversation, on your top model, two things go wrong: you pay top-model prices for grunt work, and every file dump and test log stays in the context and gets paid for again on every later turn. Subagents fix both, if you set them up for it.

The Context Window Bleed

In three months of logs measured with Agent Wrapped, subagents accounted for 60% of all usage, and almost all of them ran on the same top model as the main thread. Re-pricing that subagent work at a mid-tier model's rates would have cut it by about half. On top of that, 5,858 tool results over 4,000 tokens rode along in the main context after they arrived. A subagent has its own context. Whatever it reads stays there. Only its answer comes back to your conversation. So a subagent on a smaller model that returns a short answer saves twice: cheaper tokens for the reading, and nothing bulky added to the main thread.

Three Agent Files to Deploy

Put Markdown files in .claude/agents/ in your project or ~/.claude/agents/ for every project. The frontmatter sets the name, when to use it, which tools it may use, and which model it runs on. The guide provides three specific templates: a 'scout' agent for fast code search using haiku, a 'summarizer' for long documents also using haiku, and a 'test-runner' for noisy commands using sonnet. The 'scout' agent is instructed to return paths, line numbers, and a one-line finding each, never whole files. The 'summarizer' keeps answers under 300 words to prevent context bloat.

Why Model Selection Matters

model takes haiku, sonnet, or opus (or inherit). Leave it out and the agent runs on the same model as your main conversation, which is the expensive default most setups never change. The guide explicitly recommends sonnet for the test-runner agent rather than haiku, arguing that reading a stack trace well is worth the step up. However, for simple file location or document summarization, haiku is sufficient. By explicitly setting model: haiku or model: sonnet, you break that default and control the cost structure.

Operational Habits

With these three in place, the pattern becomes: the main conversation, on your best model, plans and decides; the agents go and look. Two more habits make the effect stick: /clear when you switch tasks, and /compact before you step away, so the cache doesn't have to rebuild a huge context when you come back. Run Agent Wrapped on your logs now, then again after a week or two with the agents in place to look at the model split and the oversized-context figure.

Key Takeaways

  • Subagents can reduce costs by about half by offloading search and summarization to cheaper models like Haiku.
  • Isolated context windows prevent large file dumps and test logs from inflating the main conversation's token count.
  • Use Sonnet for complex tasks like reading stack traces, but Haiku is sufficient for file searching and summarization.
  • Agent files are placed in .claude/agents/ and use frontmatter to specify the model, tools, and description.

The Bottom Line

Stop letting your premium model do the grunt work. By isolating search, summarization, and test execution into dedicated subagents on cheaper models, you slash token costs and keep your main context clean for actual reasoning.