Where Coding Agents' Token Costs Come From, and Seven Ways to Reduce Them
A coding agent's bill can rise even for a simple question, because each request re-sends the entire session history. Claude Code includes the full conversation with every request, and tool use adds further requests that resend that context. Prompt caching lowers the price of repeated context but does not eliminate it, while long sessions, cache misses, background tasks and compaction all add cost. Output tokens, including extended thinking, are priced at five times the base input rate, so the model's responses are a significant driver too. The article recommends measuring usage first, then applying seven levers in order: caching, scoping, controlling output, routing, batching and budgeting.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in