Entry 11Agent evaluation · measurement2026

flight-recorder measures what coding-agent sessions cost and how much of their code survives

flight-recorder reads every coding-agent session saved on my machines and scores each one two ways: what it cost, and how much of the code it wrote was still in the repository later. It ignores the agent’s own report of success, because agents often report success on work that failed. Code that stays in the repository is a sign the work held up, though it does not prove the work was correct.

sessions scored11,179
tool calls278,722
cost spent reloading context after an idle hour8.8%
each average reported with95% interval

Cost and outcome are reported separately

Each session gets two sets of numbers, shown side by side. They are kept apart because a session can produce good code at a wasteful cost, and a single combined score would hide that.

MeasureTaken fromExamples
Costthe session transcripttokens used, how often cached context was reused, tool error rate, files read but never edited
Outcomethe repository, days latershare of the session’s lines still in the code, lines a later session rewrote, commits later reverted

The outcome numbers describe what happened to the code afterwards: whether it stayed, was rewritten, or was reverted.

To check whether a line survived, the tool hashes each line a session adds (turns it into a short fingerprint of its content) and looks for that line in the current version of the file. It matches lines by their content because rebasing or squashing, git operations that rewrite commit history, change every commit ID while the code stays the same.

The tool reads saved transcripts after the fact instead of running inside each session. That adds no delay to any session, and nothing is lost if a session crashes. Reading the existing backlog this way let it score 6,264 past sessions on the first day.

Four results the first version got wrong

  1. Tool error rate read 0.000 everywhere. Only about half of failed tool calls are flagged as errors. The rest come back as ordinary text starting with “Error” or “exit code”. The tool now checks for both.
  2. About 66% of sessions looked like failures. The first rework signal was “a later session edited the same file within 7 days”, which normal follow-up work also triggers. Rework is now measured from which lines survived, and the old signal is kept only as a secondary number over one day.
  3. One repository showed a line-survival rate of 0.448 (44.8%); the corrected rate was 0.796 (79.6%). The rate was divided by every line recorded, including lines whose files the tool could not find. It now divides by the lines it was able to check, and records an unchecked line as unknown instead of lost.
  4. One model looked much worse than another, 0.508 against 0.826. The weaker-looking model had mostly been used in one difficult repository. Models are now compared only on similar work: the same repository, the same task type and a similar change size.

Checks built into the reports

Intervals are computed per sessionEach average comes with a bootstrap 95% interval computed over whole sessions instead of individual lines, since lines from one session are not independent of each other. A difference whose interval includes zero is printed as inconclusive.
Small samples show a countBelow a minimum number of sessions, the report prints the session count instead of an average.
Sessions are credited by costA session is attributed to the command that accounts for most of its cost. Counting tagged messages instead had credited the most expensive sessions to a wrap-up command that runs at the end of every long session.
Missing rates are stored as emptyWhen a rate has no denominator it is stored as an empty value, so missing data cannot show up as a perfect score.
Tool calls are checked against what was sentA companion check confirms that each tool call in a transcript matches the call that was sent over the network, and that each result matches the one delivered. It is used to test the claim of terse, a separate compression project, that its compression loses nothing.
Known weaknesses are documentedThe README lists seven known weaknesses. The largest is that commits are linked to sessions by time, so a session that overlaps a manual commit gets credit for it.
Agent evaluationStatistics PythonSQLite

Questions about the method? Email [email protected] · Back to portfolio