Source Trace
← Blog

Survival rate: what you keep, not what the agent wrote

· London, UK

Most AI coding metrics stop at the wrong moment.

AI agents now write code straight into your editor, sometimes hundreds of lines at a time. The easy way to judge them is by volume: lines generated, tokens spent. But the code an agent writes and the code that ships are very different things. You read it, run it, the tests fail, and you rewrite or delete a chunk before it ever reaches a commit. Volume can’t see that gap. Survival rate can.

The definition is plain: the share of AI-written lines that reach a commit and stay there. An agent writes 1,000 lines into your files, you keep 700, you delete 300 before committing. Survival rate is 70%. Of those kept lines, 200 were rewritten at least once, a 20% rewrite rate inside the commit. Both numbers are invisible to a tool that stops at what the agent generated, and both are far better proxies for “did this help” than tokens spent.

Why it’s the right metric

It’s comparable. Run the same work through different models and the gaps are real and consistent. One produces high-volume code that mostly survives, another needs heavy rewriting to earn its place. Different training data, different strengths, and very different behaviour from one codebase to the next.

It’s also more honest than the headlines. In one well-known study, experienced developers were measurably slower with AI while feeling 20% faster. If you’re writing a thousand lines to keep three hundred, the felt speed and the real contribution have come apart, and you’d want to know.

One caution: survival rate is only trustworthy when you’re measuring most of the work. Low coverage means a biased sample, so we check coverage first, and we filter very low-volume models. A survival rate from a handful of lines is just noise with a number on it.

This is the metric at the centre of the dashboard, and the one we judge every tool by.