今日已更新 59 条资讯 | 累计 30103 条内容
关于我们

What a Claude Code subagent actually costs: measuring the ~436k-token fixed overhead

Rulestack 2026年08月10日 23:55 0 次阅读 来源:Dev.to

Spawning a subagent in Claude Code feels free. It isn't. We measured it across a real review pipeline, and the number that matters is one almost nobody talks about: each subagent costs roughly 436,000 tokens in fixed overhead before it does any useful work. This post explains where that number comes from, how to reproduce the measurement on your own setup, and what it changes about how you should split work between agents. The experiment We run a weekly review pipeline over a catalog of digital products (Markdown-heavy repos: rules files, skills, templates). The pipeline embeds each product's full content into a reviewer prompt and asks for structured findings. We ran the same product, same full content, two ways: Arm A: three subagents , one per review perspective (buyer value, niche accuracy, compliance). Total prompt size: ~314k characters. Arm B: one subagent covering all three perspectives in sequence. Total prompt size: ~105k characters. Billed token totals, from the session transcript: Arm A (3 agents) Arm B (1 agent) Total tokens 2,150,310 809,070 Distinct defect classes found 20 11 Primary-source fetches performed 0 2 Arm B cost 37.6% of Arm A. The naive expectation — "three agents read the same content, so about 3x" — roughly holds, but the reason is not the content. Where the tokens actually go Breaking the transcript down per turn, each agent carried about 436k tokens of overhead that had nothing to do with the review itself : the initial context load at spin-up plus the cache write on its final turn. The embedded product content — the thing we assumed dominated cost — was only about 46k tokens per agent. That's a 9.5:1 ratio of fixed cost to payload. Two consequences fall out immediately: Embedding full content is cheap. We had been truncating embedded files to save tokens, which quietly excluded the files that carried the product's actual value from review. Full-content embedding turned out to cost almost nothing relative to what we were already paying

本文内容来源于互联网,版权归原作者所有
查看原文