My OpenRouter dashboard looked broken. Over one 48-hour stretch, three repositories were refactored, instrumented, tested, documented, and pushed to GitHub, and the meter read 93.8 million tokens. The charge was $3.23. That is not a typo in the dashboard and not a billing error. It is what happens when the architecture of an agent system is designed around the economics of tokens instead of around a demo, and it changed how I think about what agent work actually costs.
The work was real. Three sibling applications - a RAG pipeline over YouTube transcripts, a stock-forecasting service with drift detection and retraining, and a convex-optimization benchmarking app - each got a groundedness evaluator, a Prometheus exposition endpoint, a Grafana dashboard with provisioned panels, and a documentation pass (and, for the RAG app, a React workspace), executed across ten ordered phases with approval gates before anything was published. Seven subagent sessions ran the per-repo work. The parent session never wrote the app code. It wrote the brief, ran the gates, and refused to accept a phase until the evidence checked out.
Where the tokens actually go
The naive way to run an agent over three codebases is one long conversation. Every tool call, every file read, every test failure re-enters the context window, and the context window is where the money burns. By the tenth hour, most of each call is re-reading material the model already saw. You pay list price for your own repetition.
Prime Agent inverts the structure. A root session holds a persistent Python kernel and does coordination, not code. The heavy work goes to child sessions that start with a fresh context, work one repository, and return a report. A child that needs the test suite runs it in a shell and sends back eleven words of summary instead of streaming the output through the model. State that has to survive compaction lives in a memory layer, not in the transcript. And the deterministic parts of the job (parsing test output, diffing trees, comparing metric inventories against a contract) run as plain Python, which costs zero tokens because it never touches a model at all.
The effect compounds across both axes of the bill. Each call carries fewer tokens, because no session drags three repos of history behind it. And each token is cheaper, because the volume work runs on small routed models instead of a frontier model idling through boilerplate. If every one of those 93.8 million tokens had been billed as input at $0.075 per million, the bill would have been $7.04. If every token had been billed as output at $0.25 per million, it would have been $23.45. The real mix sits somewhere in between, which means orchestration saved me somewhere between 2× and 7×: an effective rate of about three cents per million tokens, all-in.
What the savings actually bought
The money is the least interesting part. The interesting part is what the structure made cheap enough to do at all. Validation, which is normally the first thing cut when a build runs long, was free enough to run after every phase. The parent re-ran the test suites itself rather than trusting the child’s summary. It scraped the Prometheus endpoints cold and checked counter deltas by hand. It logged into each Grafana dashboard and eyeballed every panel against the traffic it had just generated. That behavior is expensive when tokens are expensive and automatic when they are not, and the build was better for it: the dashboards shipped showing real data instead of the empty containers I would have gotten from a cheaper process.
The small models also earned their keep because the architecture assumed they would fail. A child left a Windows-1252 byte inside a UTF-8 README that broke the linter. Another wrote an assertion that could never pass: it demanded exact label equality on a histogram bucket that carries an extra le label by definition. A third validated a stack against a stale Docker image and got a 404 that looked like a backend bug. None of these survived, because none of them were found by the model that made them. They were found by a parent running deterministic checks in a fresh context. That is the generator-evaluator separation from my Meridian work, arrived at from the economics side: it turns out the cheapest way to trust cheap models is to never let them grade their own homework.
What the savings did not buy
The honest accounting cuts the other way too. Three cents per million tokens is the price of small models, and small models need orchestration the way large models don’t. The root session spent real effort turning one paragraph of intent into a phase-gated brief precise enough that a cheap model could not wander. The routing, the messaging between sessions, the memory writes, the gate evidence: none of that is free in engineering hours, and a single well-prompted frontier model would have needed less scaffolding to get one repository over the line. The economics only favor orchestration when the job is big, parallel, and verifiable. Three independent repositories with a test suite per app is exactly that shape. A one-file prototype is not.
There is also a dependency worth naming. The savings came from an architecture that treats tokens as the scarce resource. As context windows get larger and cache pricing keeps falling, that scarcity relaxes, and the specific numbers here will age. The structure won’t. Keeping model context small, pushing deterministic work out of the model entirely, and separating the agent that generates from the process that verifies are all things that get cheaper to do and more valuable to have as models improve. The same shelf-life logic I apply to harness rules applies to cost architecture.
The part I’m keeping
The number I keep coming back to is not $3.23. It is what the $3.23 represents: the cost of doing things in the order that produces correct software (evaluation before tuning, validation before acceptance, evidence before “done”) had dropped low enough that skipping those steps saved nothing. For most of my career, rigor competed with budget, and the trade was real. This project is the first time the rigorous path was also the cheap path, and that inversion came entirely from architecture: where the sessions sat, what the kernel did instead of the model, and who was allowed to say a phase was finished.
The models will keep getting cheaper and the context windows will keep getting bigger. What I built here is a pattern that survives both: spend tokens on generation, spend structure on trust, and never pay full price to re-read your own work.