OpenClaw deleted 400k lines of its own tests with one prompt trick: "remove 20% of least useful tests"

steipete · x · 2026-09-24

steipete shares that OpenClaw had an agent delete 400k lines of its own tests with almost no change in code coverage — modern models love writing tests for every tiny change, and most aren't useful.

The key lesson is goal-setting in the prompt: telling the agent to "clean up" makes it stop far too early. Instead give it an ambitious quantified target like "remove 20% of the least useful tests while maintaining code coverage within 2%", paired with a dedicated skill.

Related event: OpenClaw uses agent to delete 400K lines of tests(2 posts)→

Original post →

More from coding & agent

coding & agent channel →