Count each fix once, not once per file
If your coding agents keep returning to the same failure, this chapter of Fewer tokens to ship is for you.
Chapter 2 asked whether a warning changes the code. This one looks at repeat work that shows up across several commits.
One disk cleanup took my agents 21 fix commits across six files in 60 days, 29 if you count each fix once for every file it touched.
That history got me counting fixes by file. It also raised a question for bugs that move across files. Original account
The earlier account called those 29 fix commits, and its 47 total commits did not reproduce. I now count each fix once and say which unit I counted.
Tag every fix with its failing test
A reminder in my setup asks the agent to redesign when fixes pile up in one file.
But the same failing test can send an agent into a different file on each attempt, and if the reminder counts by file, the repeat can look like several unrelated fixes.

A reader suggested naming the failing test in the fix commit. That would group fixes for the same test across files. If there’s no test to name, I can still count by file. Reader discussion
How far to trust it
Try it on your rig
- Use the test ID from the work record, or give a reproducible failure a stable ID and save its command and expected result.
- On a retry, ask the agent to link the existing failure before making another edit.
- When a failure has no ID, a matching filename can help you investigate.
- Replay one labelled patch history and a case where the same failure moves files.
- Check whether the reminder finds the repeat, misses it or interrupts unrelated work.
To follow along on your own setup, start with the shared work record in the series setup guide.
Seeing the loop is only the start. Next, what does the agent need to break it?