A $500-a-month bill, investigated

Cost & Dispatch Shipped

Why the bill spiralled, what a dispatch actually costs, and the loop-engineering paper that seeded the entire build loop.

The question

A personal Claude bill running to $500–700 a month prompted a 640-line investigation into where the money actually went. It turned into the single most operationally useful pack in the repository.

What it found

  • A direct call to a local Ollama model took 7 seconds. The same model through a full-context agent harness took over 2 minutes 40. The overhead was the system prompt, not the model — which reframes "use a cheaper model" as "send less context".
  • A misplaced attribution header invalidated the KV cache, making local inference roughly 90% slower. A one-line configuration detail, worth minutes per call.
  • From a companion pack: the same task built solo took 20 minutes and $9 and was broken; built with a generator-plus-evaluator loop it took 6 hours and $200 and actually worked. That trade is the entire economic argument for the build loop.
  • A $6,000 overnight bill from a 30-minute polling loop after a silent cache-TTL change. Loops need budget guards that fire before the spend, not after.
  • An independent evaluator beats self-assessment — the finding that everything in this system leans on.

The same model, two ways

  • Direct call7s
  • Through a full-context agent harness160s

Identical local model: 2 minutes 40 against 7 seconds. The overhead was the system prompt, not the weights — which turns "use a cheaper model" into "send less context", and is why dispatch trims context before it trims capability.

Solo, against a generator-plus-evaluator loop

  • 20 minutes, solo9 USDand the result was broken
  • 6 hours, with an evaluator200 USDand it worked

Twenty-two times the money for the version that actually worked. That single comparison is the whole economic argument for the build loop — and the $6,000 overnight bill above is why the loop ships with budget guards rather than an appetite.

What it changed

Directly and checkably: the conductor dispatches through claude -p subprocesses because of this research, and the named logical model tiers in the code — balanced, high-reasoning, fast-cheap — are exactly what it recommended. A separate file in the same directory proposed specialist-as-subprocess with worker and verifier subagents; the dispatcher today uses precisely those two names, and the database carries the parent-dispatch column that design asked for.

And the paper the build loop came from

The propose → measure → feedback → refine structure was seeded by a compiler-optimization paper — the design document names it in its first lines and quotes this pack's bottom line verbatim. The build loop is that paper's loop with a conformance oracle in the measure slot.

Sources