Measuring coding agents by what happens to their code
I compared four Claude models on 612 coding sessions in my own repositories. How much of their code survived did not differ detectably, but how much of my usage limit each session used did.
Result. Between 30 June and 1 November 2026, the share of an agent’s code still present later did not differ detectably between Claude Opus 4.8, Opus 5, Opus 5.5 and Sonnet 5. For every pair of models, the 95% interval (the range the difference plausibly falls in) runs from negative to positive. Usage did differ: on comparable work, Opus 5.5 used about 91,000 more weighted tokens per session than Opus 5 (95% interval 43,000 to 138,000). Weighted tokens measure how fast a session uses up my five-hour usage limit. They do not reflect the models’ different prices.
Data. 681 coding sessions with checked survival, 612 of them from the four models compared, out of 11,611 sessions recorded by flight-recorder. The models were not assigned at random, which is the main limit on these results.
What I wanted to know #
When I switch the model my coding agent uses, I want to know whether more of the code it writes stays in place, and what the switch costs. Most model comparisons answer this with public benchmarks or with the agent’s own report that a task succeeded. I wanted an answer from my own repositories, using evidence that does not depend on the agent’s report: whether its code is still there days or weeks later. Code that remains is not necessarily correct.
Where the data comes from #
Every coding-agent session on my machines leaves a transcript on disk. flight-recorder reads those transcripts after the fact and stores one row per session in SQLite. Between 30 June and 1 November 2026 it recorded 11,611 sessions, 1,297 of them coding sessions, meaning sessions that edited at least one file. 681 of those had lines whose survival could be checked.
| Model | Coding sessions with checked survival |
|---|---|
| Claude Opus 5 | 193 |
| Claude Sonnet 5 | 171 |
| Claude Opus 4.8 | 127 |
| Claude Opus 5.5 | 121 |
These four models account for 612 of the 681 sessions. Other models appear in the data with fewer than 20 sessions each and are left out of the comparison.
Cost is measured in weighted tokens. Each kind of token (input, output, writes to the prompt cache, reads from it) gets a weight for how fast it uses up my five-hour usage limit, fitted by regression (R² 0.94).1 The same weights apply to every model, so this measures usage against a limit and does not reflect the models’ different prices. Each session’s cost is reported in thousands of weighted tokens.
How survival is measured #
For each session, flight-recorder hashes every substantive line the agent added, turning each line into a short fingerprint. When the session is scored, it looks for each fingerprint in the file as it is at that time, checking up to 60 files per session. A session’s survival is the share of its checked lines that are still present. A survival of 0.85 means 85% of the lines checked are still in the code.
Lines are matched by content because rebasing (replaying commits onto a different starting point) and squashing (combining several commits into one) both change every commit ID. Tracking commit IDs would score surviving code as deleted whenever history is rewritten this way.
Lines whose file cannot be found are recorded as unknown and are not counted when computing the share. An early version counted them as deleted, which made one repository score 0.448 when the correct figure was 0.796.
How models are compared #
Comparing all sessions of one model with all sessions of another mixes in the kind of work each one did. A model used mostly in a hard repository looks worse for that reason alone. So sessions are grouped into cohorts: the same repository, the same task type, and a similar change size (small, medium or large).
Within each cohort where both models have at least 4 sessions, the tool takes the difference between their averages. Those differences are then averaged across cohorts, so every result below is a difference between two models. Each figure comes with a 95% interval from a bootstrap, which resamples the sessions many times with replacement and recomputes the difference each time.2 When an interval includes zero, the data does not distinguish the two models on that measure.
What the comparison found #
How much code survived
No pair of models differs detectably in survival. The estimated differences are all within 0.08 of zero, and every interval crosses it.
The numbers in this chart
| Pair | Cohorts | Difference | 95% interval |
|---|---|---|---|
| Opus 4.8 − Opus 5 | 11 | +0.030 | -0.027 to +0.089 |
| Opus 4.8 − Opus 5.5 | 8 | -0.022 | -0.108 to +0.053 |
| Opus 4.8 − Sonnet 5 | 8 | -0.076 | -0.189 to +0.015 |
| Opus 5 − Opus 5.5 | 13 | -0.027 | -0.137 to +0.074 |
| Opus 5 − Sonnet 5 | 9 | -0.007 | -0.100 to +0.108 |
| Opus 5.5 − Sonnet 5 | 7 | -0.000 | -0.132 to +0.163 |
Cost per session in weighted tokens
Weighted tokens separate the models in five of the six pairs. Opus 5.5 used the most weighted tokens in every pair it appears in. On comparable work it used about 71,000 more weighted tokens per session than Opus 4.8, 91,000 more than Opus 5, and 138,000 more than Sonnet 5.
The numbers in this chart
| Pair | Cohorts | Difference | 95% interval |
|---|---|---|---|
| Opus 4.8 − Opus 5 | 11 | +62k | +7k to +116k |
| Opus 4.8 − Opus 5.5 | 8 | -71k | -129k to -14k |
| Opus 4.8 − Sonnet 5 | 8 | +84k | +33k to +145k |
| Opus 5 − Opus 5.5 | 13 | -91k | -138k to -43k |
| Opus 5 − Sonnet 5 | 9 | +33k | -6k to +68k |
| Opus 5.5 − Sonnet 5 | 7 | +138k | +107k to +168k |
What the other measures showed
Sonnet 5’s tool error rate was higher than each Opus model’s, by 1.3 to 1.8 percentage points, and the intervals for these differences exclude zero. Two more measures separated Opus 5 from Sonnet 5: Opus 5 read fewer files it never edited, and rewrote less of its own output. The other model pairs were inconclusive on those two measures.
On my repositories over these four months, I detected no difference in survival between the model that used the most weighted tokens and the models that used fewer. The limits below apply to that finding.
What these results cannot show #
- Models were not assigned at random. I chose the model for each session, and my default changed over time. Model, time period and the kind of task I gave each one are mixed together. Cohorts reduce this but cannot remove it.
- No detectable difference does not mean no difference. Each model has between 4 and 32 sessions per cohort, and most cohorts have fewer than 15. With intervals this wide, a survival gap of around 10 percentage points between two models could go unseen.
- Sessions were checked at different ages. Survival was measured when each session was scored. The tool re-scores a session only until it is seven days old, and then keeps that figure. Only 37 of the 1,296 scored sessions were scored on or after 31 October. Many older sessions were scored more than a week after they ended, which gave their lines longer to be rewritten: 666 of the 1,146 sessions that ended before 20 October were scored more than 8 days after they ended.
- The data comes from one developer’s repositories. These are my projects and my habits. The method can be run elsewhere, but these numbers describe only mine.
Errors found in earlier versions of the tool #
Earlier versions of flight-recorder reported each figure below, and each was wrong for the reason given. The flight-recorder case study has more detail.
- The tool error rate read 0.000 everywhere, because about half of failed tool calls are not flagged as errors. It now also checks the text of each result.
- About 66% of sessions looked like failures, because a later edit to the same file within 7 days counted as rework. Rework is now measured from line survival.
- One repository scored 0.448 survival instead of 0.796, because unfindable lines counted as deleted.
- One model looked far worse than another, 0.508 against 0.826, because it had mostly been used in one difficult repository. This is why comparisons are now made within cohorts.
How to reproduce it #
The flight-recorder repository is private, so these commands are for reference. They build the database from local transcripts, score survival against git, and print the comparison above.
python3 ingest.py # read new transcripts into SQLite
python3 score.py --git # link commits, check line survival
python3 report.py models --min-n 4 # matched-pair model comparison
The numbers behind both charts are in data.json, copied from that report on 1 November 2026.
Corrections #
None yet. Corrections will be listed here with their date.