liveBook · Manning

Cost per iteration

As explained in Vibe Engineering

Cost per iteration is a metric for the resources, including monetary cost, CI time, and developer attention, consumed by one agent development loop.

Cost per iteration (CPI) measures the resources consumed by one agent development loop: model tokens, CI time, and developer attention. Treating token spend as the whole cost hides the largest variable: people reviewing agent output. section 10.3.3 section 10.3.6

Track CPI as a combined operational cost rather than a single invoice:

  • Compress the build portion with remote caching, incremental builds, and shared artifacts; one agent's compilation can become another agent's cache hit. section 10.3.3
  • Keep verification separate: cache hits accelerate execution, but selecting the tests required for a change still demands engineering judgment. section 10.3.3
  • Include review overhead, because senior engineers reading Yellow and Red agent output can outweigh licenses, infrastructure, and tokens combined. section 10.3.6

A falling CPI in a monorepo

A team targeted CPI below $0.50. Without remote caching, iterations cost about $1.20; after cache warming and broader agent participation, CPI fell from $0.95 to $0.31 over six weeks. The result demonstrates a team-scale effect: adding agents can reduce each agent's build cost, while review and verification remain separate cost centers. section 10.7.1 section 10.3.3

Figure 10.4 Remote caching: Shared cache gets warmer as more agents run.

Use the shared-cache diagram to see why additional agents can warm a common build cache and lower subsequent iteration costs. section 10.3.3

How Vibe Engineering covers it

How deep it goes
Defines cost categories, distinguishes build from verification, and quantifies cache effects without prescribing test-selection rules.
Examples
Uses monorepo cache comparisons, six-week CPI measurements, and a dashboard showing tokens, infrastructure, licenses, and review costs.
What it assumes
Assumes agent loops, CI, caching, and code review; teaches how these inputs combine into an iteration-level cost.
What you can do after
Evaluate agent infrastructure by measuring CPI, separating cacheable build costs from verification, and exposing human review costs.
How it connects
Connects remote caching, continuous integration, verification, test selection, review overhead, and return on investment.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vibe Engineering. The section links point to the parts of the book it draws on.