My Agent Kept Re-Running Green Tests to Feel Safe. The Log Caught It Five Times.

The tests were green. My agent ran them again. Then again. Nothing had changed. No code, no config, no environment.

It ran them because watching the green made the run feel more certain. My violation log caught it doing this five separate times, and that is the story of how a process habit got named, diagnosed, and replaced with something that actually verifies.

The Pattern, Read Aloud

From the log, because the receipts matter more than anyone's memory of them:

After each of six milestone tickets, the full functional suite was re-run, roughly eighty-five seconds each time. Six tickets, six full runs, when the rule says run each ticket's targeted tests and gate the milestone once at the end.

During a module rename, the full SDK suite, about 3,500 tests, ran at least three times, when the failing tests were the only thing that needed running.

Same day, different ticket: specific failures had already been fixed and individually verified. The full suite launched anyway, five minutes, to "confirm." The rule it broke says the full suite runs once at the milestone gate, only when told. Nobody had told it. There was nothing new to confirm.

Five entries. One shape. A suite re-run on an unchanged system, purchased at real cost, producing zero new information.

Why an Agent Does This

The uncomfortable part is that none of it was laziness. It was rigor, wearing the wrong clothes.

A green run is a feeling of safety delivered in about a minute. A second green run doubles the feeling while adding nothing to the evidence. The behavior is reinforced by the exact thing that makes it useless: it always works, it never surprises, and it feels productive every single time.

And the incentive gradient points the wrong way. Nobody gets blamed for running the suite twice. The cost is invisible and the comfort is immediate, which is the precise economic profile of every bad habit in engineering.

There is a subtler cost too, and it is the one that matters. A suite run is a measurement, and a measurement only carries signal when something changed. Re-measuring an unchanged system teaches nothing while diluting the meaning of the runs that do. If every run is ceremonial, the one run that should have gotten attention is just another green line in the scrollback.

tip: A test run is a question about a change. If nothing changed, you are not asking a question. You are performing a ritual and paying for it in minutes.

The Diagnosis

Once five entries lined up, the diagnosis was clear, and it was not a discipline problem. Willpower was never going to fix it.

The re-runs happened at predictable moments: after a merge, after a fix, after a rename, at the end of a session. Each moment was a small anxiety spike, and the full suite was the nearest anxiety pill. The habit was a symptom of a missing process, specifically a missing definition of done.

Without a defined gate, "verified" means "as verified as I feel." With a defined gate, "verified" means "the named checks ran and here is the log." The five entries were not an agent refusing to follow rules. They were an agent doing the only kind of verification that existed before the real one was written down.

The Fix, Which Is Not Willpower

Three changes, all structural:

A single milestone gate. The full suite runs once, at the end, on demand, by rule. Its authority comes from its rarity. One gate run per milestone is a measurement. Six is a ritual.

Targeted re-runs of exactly what changed. Fixed a test? Re-run that test. Renamed a module? Run the module's tests. The verification should match the change the way a diff matches a commit.

The log closes the loop. Every unnecessary full-suite run gets logged as a breach, by the runner itself. The log did what no lecture could: it turned a feeling-based habit into a countable pattern, and countable patterns die fast.

None of this required the agent caring harder. It required making the wrong thing visible and the right thing mechanical.

The Honest Limitation

Two caveats, because this habit has legitimate cousins.

Sometimes a second run is correct: flaky suites where reproducibility is the thing under test, or environments where you genuinely suspect state. The rule is not "never re-run." It is "a re-run without a changed variable needs a stated reason," and the stated reason goes in the log.

And this piece is about one operator's setup, self-reported, from a system where the logs happened to be unusually honest because the agent was required to write them. Your agent's re-run habit will have different triggers. Find them the same way: read its history and count the runs where nothing had changed.

Audit Your Own Scrollback

The homework is genuinely fifteen minutes. Open your last week of test runs, yours or your agent's. For each one, ask: what had changed since the previous run? Count the runs where the honest answer is nothing.

That count is the price of comfort. Mine was five entries in a log, roughly twenty minutes of compute per week and a diluted signal on every real run, which was the expensive part.

So here is the question, and it is answerable from your own terminal history: what did your agent re-run this week that did not need re-running, and what was it actually buying?

If the honest answer is "peace of mind," there is a cheaper store, and it is called a defined gate.