Why coding-agent harnesses can cost more than the model prompt
Source
Caleb Writes Code
Author
Caleb Writes Code
Date
Key takeaways · AI-distilled
A short user prompt can trigger much larger model requests because the agent harnessThe scaffolding around a model that turns it into a working agent — the loop, the tools it can call, and the rules for when to stop.Full definition → adds instructions, tool definitions, and conversation context windowThe maximum amount of text a model can consider at once — its working memory for the current conversation or task.Full definition →.
Tool execution is a loop: multiple requests may be needed for a task, so per-task cost depends on both request size and the number of turns.
Caleb discusses caching as a cost lever, but his provider economics include assumptions; the video also contains a sponsored segment.
Terms in this piece · Glossary
AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
agent harness — The scaffolding around a model that turns it into a working agent — the loop, the tools it can call, and the rules for when to stop.
context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
Why it matters
Compare the cost of a completed AI agentAn AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.Full definition → task rather than model tokenThe chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.Full definition → prices alone. Harness overhead and cache behavior can make the same model cost different amounts in different clients.