{"slug": "how-to-control-claude-code-subagent-cost", "title": "How to control Claude Code subagent cost", "summary": "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.", "body_md": "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.\n\nA simple PR, just a few hundred line diff.\n\nThe cost? $70!!!\n\nI ordinarily am pretty efficient with my token usage, so this was a shocking number to see.\n\nWhat 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.\n\n## Claude can spin off its own subagents\n\nSubagents in Claude Code are an important way to manage context, which in turn improves performance.\n\nYou can manually ask Claude to spin off subagents when relevant, or you can trust it to handle subagent creation on its own.\n\nClaude 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.”\n\nAny 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.\n\n**So what happened to my PR review?**\n\nClaude 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.\n\nAs 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.\n\nIf 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.\n\nI’d love to have you join us and get notified when we share more tutorials like this.", "url": "https://wpnews.pro/news/how-to-control-claude-code-subagent-cost", "canonical_source": "https://www.augmentedswe.com/p/claude-code-subagent-cost", "published_at": "2026-10-07 11:30:53+00:00", "updated_at": "2026-10-07 11:47:58.732576+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "ai-products"], "entities": ["Claude Code", "Anthropic", "Opus"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/how-to-control-claude-code-subagent-cost", "markdown": "https://wpnews.pro/news/how-to-control-claude-code-subagent-cost.md", "text": "https://wpnews.pro/news/how-to-control-claude-code-subagent-cost.txt", "jsonld": "https://wpnews.pro/news/how-to-control-claude-code-subagent-cost.jsonld"}}