liveBook · Manning

Retry and failure cost

As explained in Vibe Engineering

Retry and failure cost is the resource expense of unsuccessful AI attempts made before a task is completed.

Retry and failure cost measures resources spent on unsuccessful AI attempts before a task is completed. In IDE workflows, failed attempts may produce no error code: a subtly wrong refactor, a missed edge case, and a successful third attempt can consume three full agent sessions. section 9.1

Track the hidden cost through:

  • Average attempts per successful task; one team recorded 1.7 prompting attempts. section 9.1
  • Context growth across attempts, as developers add error messages, failing tests, and additional files. section 9.1
  • Wasted tokens that cost more than the tokens producing the final answer. section 9.1

Three sessions for one refactor

A refactor returns subtly wrong, a second attempt misses an edge case, and a third attempt succeeds. Although no API error occurs, the first two sessions still consume paid model context and developer attention. section 9.1

Figure 9.1 The Cost Iceberg - visible subscriptions and API spend vs. hidden costs in AI-assisted development.

The cost iceberg places retry waste below visible subscriptions and API spend, alongside other hidden production costs. section 9.1

How Vibe Engineering covers it

How deep it goes
Distinguishes IDE retries from API errors and quantifies attempts and expanding context, but does not define a formal retry policy.
Examples
Uses a three-attempt refactor and Cursor usage logs showing 1.7 attempts per successful task.
What you can do after
Diagnose/debug retry waste by analyzing usage logs and accounting for context added after failed attempts.
How it connects
Connects retries with context size, token cost, latency, and quality and trust erosion.

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.