cd /news/ai-agents/how-to-control-claude-code-subagent-… · home › topics › ai-agents › article
[ARTICLE · art-146759] src=augmentedswe.com ↗ pub= topic=ai-agents verified=true sentiment=↓ negative

How to control Claude Code subagent cost

A Claude Code user reported that a single PR review of a few hundred lines cost $70 in API usage after Claude spun off 25 subagents, each running on Opus because the main thread was set to Opus. The user attributed the subagent count to a reasoning/effort setting of "max" and said the fix is a simple configuration change to control which model subagents use. The account, published as a guide, warns that subagents inherit the main thread's model and run in parallel with their own context windows.

by read2 min views4 publishedOct 7, 2026
How to control Claude Code subagent cost
Image: Augmentedswe (auto-discovered)

The other day, I was working a project with Claude Code and using API pricing. I asked Claude to review a PR I was looking at.

A simple PR, just a few hundred line diff.

The cost? $70!!!

I ordinarily am pretty efficient with my token usage, so this was a shocking number to see.

What happened was obvious in hindsight, and it boiled down to subagents. Read on to learn what happened, and how to control your subagent cost with a very simple setting.

Claude can spin off its own subagents #

Subagents in Claude Code are an important way to manage context, which in turn improves performance.

You can manually ask Claude to spin off subagents when relevant, or you can trust it to handle subagent creation on its own.

Claude might make a subagent to handle a task like “find how user authorization is handled and report back step-by-step instructions on adding a new authorized feature.”

Any subagent runs in parallel, and it gets its own context window! When it’s done, the result is returned to the parent, and the main context window isn’t littered with the entire journey.

So what happened to my PR review?

Claude spun off 25 subagents! 25!!! This was truly nuts for the task at hand, but I suspect that having reasoning/effort set to “max” is to blame. The biggest problem was that I was using Opus for the main thread.

As a result, each of the 25 subagents was also using Opus. This is 100% to blame for costs getting so high so fast, and the fix is pretty simple.

If you’re a power user of coding agents, you’re obviously in the right spot. I spend dozens of hours researching each of these guides so you have a shortcut to building software with AI. I’d love to have you join us and get notified when we share more tutorials like this.

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-control-claud…] indexed:0 read:2min 2026-10-07 · —