How to Cut Agent Token Spend by 80% Without Changing Models
A practitioner reports cutting token spend on dynamic agent workflows by roughly 80% through prompt and workflow restructuring alone, which points at an uncomfortable truth: most agent spend is not on the task, it is on context you resend by default.
Sep 9, 2026 · 6 min read
Key takeaways
A reported 80% reduction in token spend on dynamic Claude Code workflows came from restructuring, not from switching to a cheaper model.
In a typical agent loop, the actual task instruction is a small fraction of billed tokens. The rest is scaffolding.
Agent cost grows faster than agent usage, because conversation history is resent on every turn.
Model switching saves a fixed percentage. Structural fixes change the shape of the curve.
Do the structural work before you shop for a cheaper provider.
Why is agent spend different from chat spend?
A single chat completion bills roughly what you can see: a prompt in, a response out. An agent loop does not work that way. Each turn typically resends the system prompt, the tool schemas, the full conversation so far, and any retrieved context, then adds a new step on top.
The consequence is that cost does not scale linearly with the amount of work done. A twenty-step agent run is not twenty times a one-step run, it is considerably more, because every step carries the accumulated weight of the ones before it. Teams model agent cost as a multiple of chat cost and are then surprised by the invoice.
Where do the tokens actually go?
If you instrument a real agent run and break the input down, the pattern is usually consistent:
Tool and function schemas, resent every turn regardless of whether the agent uses them.
A long system prompt with instructions, formatting rules and examples, also resent every turn.
The full conversation history, including tool outputs the agent already extracted what it needed from.
Retrieved documents, often pulled in generously because retrieval is cheap and reasoning about relevance is not.
The actual task instruction, which is frequently the smallest segment on the chart.
That distribution is why an 80% reduction is achievable without touching model choice. You are not compressing the work. You are removing repetition that was never load-bearing.
What actually recovers the tokens?
In rough order of payoff:
Trim the tool surface per step. An agent that can see forty tools pays for forty schemas on every turn. Most steps need three. Expose tools by phase rather than all at once.
Summarize history instead of replaying it. Once a tool has returned a 4,000 token payload and the agent has extracted one fact, keep the fact. The raw payload has no further value and is being billed on every subsequent turn.
Use prompt caching on the static block. If your system prompt and schemas are genuinely fixed, they should be cached rather than reprocessed. This is the single highest ratio of savings to effort available.
Retrieve less, more precisely. Pulling ten documents when two are relevant is not free just because the retrieval step is cheap. The cost lands downstream, in the context window.
Shorten the loop. Many agent runs take extra turns because the first instruction was vague. Tightening the instruction removes turns, and removing a turn removes the entire accumulated context that turn would have carried.
Why does this beat switching to a cheaper model?
Here is the observation worth adding, and it is the reason to sequence these two moves correctly.
Switching models applies a fixed discount to whatever you are already spending. If you move to a model at one third the price, you pay one third. That is real, and it is also the last thing you should do, because it discounts your waste along with your work.
Structural fixes change the growth rate instead. Trimming resent context does not reduce cost by a constant, it reduces how fast cost climbs as your agent runs get longer, and agent runs always get longer. A structural fix compounds with every future feature. A model switch does not.
Done in the right order, you restructure first and then switch models, and the discount applies to a much smaller base. Done in the wrong order, you switch models, feel relieved, and rebuild the same waste at a lower unit price.
A one-afternoon audit
1Log the full input payload for ten real agent runs, not synthetic ones.
2Categorize every token: schemas, system prompt, history, retrieval, task.
3Find the largest category that is not the task. That is your target.
4Apply the single cheapest fix for it, usually caching or history summarization.
5Re-measure cost per completed run, not cost per call.
Most teams find their answer in step three, and it is rarely the one they expected.
Agent bills are not expensive because reasoning is expensive, they are expensive because you are paying to resend the same context over and over. You can model an agent workload's cost per run before and after restructuring in the Calcaas LLM cost calculator.
Frequently asked questions
Why do AI agents cost so much more than simple API calls?
Because each turn of an agent loop resends the system prompt, tool schemas and full conversation history alongside the new step. Cost accumulates with every turn rather than scaling linearly with the work performed.
Can I really cut agent token costs by 80% without changing models?
A practitioner reports achieving roughly that on dynamic Claude Code workflows through prompt and workflow restructuring. The size of your own reduction depends on how much of your context is repetition, but the technique targets waste rather than capability.
What is the fastest agent cost fix to implement?
Prompt caching on the static portion of your prompt, if your provider supports it. The system prompt and tool schemas are usually identical every turn, so caching them removes a large recurring charge with almost no code change.
Should I reduce tokens or switch to a cheaper model first?
Restructure first. A cheaper model applies a fixed discount to your current spend, including the waste. Structural fixes reduce how fast your cost grows as agent runs get longer, and then the model discount applies to a smaller base.
How do I find out where my agent tokens are going?
Log the complete input payload for ten real production runs and categorize every token as schemas, system prompt, conversation history, retrieved context or actual task. The largest non-task category is where your money is. Place the JSON-LD block above inside a <script type="application/ld+json"> tag in the page head. The questions and answers must stay identical to the visible FAQ section. Source: Hacker News discussion, https://news.ycombinator.com/item?id=49587379