A developer has created a Python tool called `subagent-tax` to analyze the token usage of Anthropic's Claude Code subagents. The tool reveals that each subagent call re-sends a fixed preamble of approximately 51,000 tokens, which includes the system prompt, tool schemas, and skill listings. This can lead to significant token waste, with an estimated $20.20 in costs for 132 observed calls in one user's case. The tool helps identify the most costly components of this preamble, suggesting optimizations like slimming down the system prompt to save tokens. AI
IMPACT Highlights potential inefficiencies in LLM agent architectures, prompting developers to optimize token usage and reduce costs.
RANK_REASON The cluster describes a new, third-party tool developed to analyze the performance and cost-efficiency of an existing AI product's features.
Read on dev.to — Claude Code tag →
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →