The agent ran the full test suite after every tiny change. Here is how I stopped it.
An AI agent runs the complete test suite after every tiny change, because waiting costs it nothing. In one project the suite time went from 8 hours a week to 30. A rule, a hook and default test selection halved the full runs per commit, and the growing suite ate the saving.
Testing is good. But my AI agent runs the complete test suite after every tiny change and hardly makes any progress. How can we resolve this?
An AI agent changes three lines and starts the complete test suite. It changes one more line and starts it again. A developer would not. A developer looks at what the change can touch, runs the tests around it, and saves the full run for later. The agent has no reason to: the minutes it waits are not its minutes.
I watched this for months on jawata, my own Java project. This is how it ramped up, what a rule did about it, and what the rule could not do.
The habit
Three things repeat, and every one of them looks harmless:
- The full suite after every small step. Even when the change is a comment or a rename inside one class. A human estimates the risk and the reach of a change. The agent runs everything.
- Waiting in the foreground. It starts the suite, then stops and waits for it, with nothing else going on.
- Running everything again to find which test failed. A handful of tests fail, and the first instinct is another full run to find where. The run that found them already named them.
While the suite runs, the machine is busy and nothing else gets built beside it. As the project grows, the suite grows, and the habit costs more every week.
It was fine at the start. Then it ramped up.
In the week of 13 July the full suite ran for 8 hours in total. In the week to 6 September it ran for 30 hours: 202 full runs for 224 commits, 0.90 full runs per commit, so the agent ran the complete suite after nearly every change. On the worst day, 6 September, the suite ran 40 times for 7.9 hours, for 56 commits. On six days before the rule it ran for 5.5 hours or more, and on 23 of the 43 days with any run it ran ten times or more. The machine worked the whole day on a few small changes, and the bigger the suite got, the longer every step waited.
The rule
The rule is simple: the full suite runs only at checkpoints and releases. Between checkpoints, the agent runs the tests around the change. If one test fails, that test runs alone until it passes.
A reminder does not hold, so the rule sits in a hook, a script that runs before a command and can refuse it. The hook refuses the packaged full suite unless the command names the checkpoint it is for. The test tool in jawata, which the agent drives through MCP (Model Context Protocol, the standard way an agent calls outside tools), also selects by default only the tests a change reaches. It runs the whole scope only when its coverage evidence cannot carry that claim.
What we measured
One repository (jawata), 98 days of git history, and every completed full-suite result in the agent session logs: 931 runs between 13 July and 3 November 2026. Nothing is estimated. The rule came in on 8 September and was tightened on 6 October.
| Before the rule (13 Jul to 7 Sep) | Rule in force (8 Sep to 5 Oct) | Checkpoints only, selection by default (6 Oct to 3 Nov) | |
|---|---|---|---|
| Commits | 804 | 228 | 485 |
| Full runs | 632 | 94 | 205 |
| Full runs per commit | 0.79 | 0.41 | 0.42 |
| Median run | 7.6 min | 12.6 min | 15.4 min |
| Median number of tests | 2,068 | 2,996 | 3,809 |
| Suite minutes per commit | 6.0 | 5.3 | 6.7 |
| Days with 10 or more full runs | 23 of 43 | 3 | 8 of 27 |

The rule did what it was meant to. Full runs per commit fell by about half, from 0.79 to 0.41. Days with ten or more full runs fell from 23 of 43 active days to 8 of 27. The eight heaviest days all fall before 9 September. After the rule the heaviest days are about five hours.
But the minutes per commit did not fall: 6.0 before, 6.7 now. Each run got longer, because the suite roughly doubled, from a median of 2,068 tests to 3,809. A simple calculation shows the rest. At the early run length of 7.6 minutes, 0.42 runs per commit would cost about 3.2 minutes per commit, half of the 6.0. That is arithmetic, not a measurement. The growth of the codebase ate the saving.
The run time itself grew a little faster than the test count. Tests rose by a factor of 3.4 from July to November and the median run by 4.2, about 25% more minutes per 1,000 tests. That is worse than proportional, but not wildly.
The chart shows one more thing: full runs per commit rise again after 5 October, from 0.32 to about 0.57. Part of the cause is plain. The runs per week stayed near 50, while the commits fell from about 145 a week to about 90. In those weeks commits got fewer and larger: the median grew from 3 files per commit to 6. Several large structural changes landed, among them a module split out and a published interface changed, alongside ongoing small work. The rule cannot make a large change cheaper. It makes the full run a decision. A second factor: in the last full week, a quarter of the runs were started by helper agents working in parallel, and the red share that week was 25% instead of the usual 12 to 14%. How much of the rise each factor explains, I cannot say.
One more figure: about one run in five ended red. Many of those are the loop of run, fix one thing, run again. A red run costs the same minutes as a green one.
What I will not claim
The numbers have limits, and I would rather list them:
- One project, one machine. The counts of runs are a floor, because they only include runs the agents started in their sessions. Runs I started by hand elsewhere are not in them, and the commit counts cover only the repository the suite belongs to, not work in other repositories.
- Wall time, not processor time. Each full run is split over four shards that run in parallel. The processor time per run was not recorded, and the way the shards are sized was changed once on 12 September.
- Gaps. There are no sessions and no commits between 15 September and 2 October, so the middle period has fewer active days than its length suggests.
- The rule is not airtight. In the last weeks the logs show more full runs than declared checkpoints. Some runs reach the suite without passing the hook, for example through helper agents or command forms the hook does not recognize. I have not yet found out which.
What it means
A fast agent at the start of a project does not stay fast, and not because it gets slower. The checks it runs get more expensive with every test the project adds, and an agent that does not care about the wait runs them at every step. Telling it to be careful does not change that. The cost of checking has to be part of the process: when the full run is allowed, what it names, and what runs instead.
The rule halved the runs and could not stop the suite from growing. That is the honest result, and the reason that selecting only the tests a change reaches matters more with every month of growth.