
Agent Bills Are Mostly for Reading Context, Not Writing Answers
A 2026 multi-institution study shows agentic coding costs are dominated by input tokens—often about 154 inputs for every 1 output.
Many people still picture AI cost as “the model typing a long answer.” For chat, that instinct is roughly fair. For coding agents that open a repo, call tools, and iterate for many turns, the bill looks different: most of the money goes to reading what has piled up in context, not to generating the next patch.
Same “coding” label, wildly different bills
The team ran experiments on OpenHands, a mainstream open-source coding-agent framework, against SWE-bench Verified—500 real GitHub issues with full repos and tests—across eight frontier models, with repeated runs to reduce one-off noise.
They compared three kinds of coding work. Code reasoning: one-shot problem solving with no tools. Code conversation: multi-turn chat about code. Agentic coding: an agent finishing a repository-level task on its own.
- Average tokens for agentic coding were about 3,500× code reasoning and about 1,200× code conversation
- Average money cost: about $1.857 per agentic task, versus about $0.023 for reasoning and $0.016 for conversation
The ratio that flips the intuition
Ordinary code chat and reasoning sit near a balanced input/output mix—roughly 1.33:1 and 1.19:1. Agentic coding jumps to about 153.85:1. In plain terms: for every token the agent writes, it often processes about 154 tokens of input.
Why? Agentic work is long-context and multi-turn. The agent keeps stuffing repo contents, tool results, and prior turns back into the prompt. Even with token caching, the amount of input that must be processed each round still grows aggressively. The expensive habit is rereading the growing pile—not writing the next short command.
What this means if you pay the bill
Saving money on agents is less about “make the model talk less” and more about managing what it keeps reading: narrower scopes, fewer redundant file opens, clearer stop conditions, and tooling that avoids dumping the whole history every turn. Agent cost was never mainly a generation bill. It is a context bill.