Steinberger. OpenClaw deleted 400k lines of tests
The trick is not the deletion, it is giving the agent a number it can measure itself against.
Peter Steinberger says OpenClaw deleted around 400k lines of its own tests without much change in code coverage. His explanation for how the tests got there in the first place is short. Modern models love writing tests for every tiny change, he says, even when those tests are not useful.
If you just tell the agent to clean up, it will stop far too early.
Modern models just love writing tests for every tiny change, even if they aren't useful.
The part worth copying is the prompt. Steinberger says a vague cleanup instruction does not work, because the agent declares victory early and leaves the bulk of the dead weight in place. Instead he gives it a target with two numbers in it, something like removing 20% of the least useful tests while maintaining code coverage within 2%.
Why the number matters
An ambitious goal with a measurable bound gives the agent something to check itself against after each pass. Coverage is the guardrail, the percentage is the quota, and neither of them depends on the model's own sense of when a job looks finished. "Clean up the tests" has no stopping condition the agent can evaluate, so it invents one, and it invents a lenient one.
This is the same shape as other agent-wrangling advice going around. It is not a new tool or a new model, it is a prompt that swaps a judgment call for an arithmetic check the agent can run. If your test suite has a coverage number, you already have the instrument.
The caveat
This is one person reporting one result on one codebase, and OpenClaw's test suite got to 400k lines of low value tests partly because agents wrote it that way. A repo whose tests were written by humans with intent is a different problem, and coverage holding steady is not the same as behaviour holding steady. Coverage counts lines executed, not assertions that would actually catch a regression, so a suite can shed its most valuable tests and still report the same figure.
Steinberger did not publish before and after failure rates, so how much real safety net came out with the 400k lines is not something the source answers.
