An "AI agent" (like a coding assistant) doesn't answer once — it loops: think, use a tool, read the result, think again. Every loop re-sends everything so far plus the tool output. That's a furnace that quietly eats tokens. Let's watch one run.
Press Next step to run the agent one loop at a time. Each step it thinks, calls a tool, and reads the result — and re-sends the whole growing history to the model. Watch the cost per step climb.
tokens burned so far
💸 Running cost:
Real agents paste tool output (terminal logs, file contents) back into the context. Tap to make one tool dump a giant 4,000-token error log — then keep stepping and watch every later step carry that weight.
Same "fix the bug" task, $0.05 budget. Pick your settings and run the agent — keep it lean enough to finish under budget. Trimming tool output and capping steps are your friends!
Agent frameworks (like the coding assistants you may use) all fight the furnace:
Summarize logs/files before re-adding them. ✅ Stops the furnace roaring. ⚠️ Might drop a needed detail.
Max steps + a dollar limit that halts the loop. ✅ No runaway bills. ⚠️ May stop before finishing.
Small models for simple steps, big ones only when needed. ✅ Cheaper & faster. ⚠️ More complex to build.
You saw the agent furnace: every loop re-sends the history plus tool outputs, so an agent can cost many times a single answer — and one giant log poisons the whole run. Now you know the fixes: trim tool output, cap the steps, and route to cheaper models.