OpenClaw Deletes 400k Lines of Tests Using Dedicated Agent Skill

X postPeter SteinbergerNews

Peter Steinberger reported that OpenClaw pruned around 400,000 lines of its own test code with minimal impact on code coverage. The cleanup was driven by an agent skill called 'test-audit', which targets low-value, redundant, or implementation-coupled tests.

Key points

  1. OpenClaw removed roughly 400,000 lines of test code while maintaining virtually identical code coverage.
  2. Steinberger observed that modern AI models tend to write tests for every minor change, even when they add no meaningful verification value.
  3. The 'test-audit' skill operates across three modes: authoring mode (gating new tests), audit mode (focused test sweeps), and campaign mode (pruning an entire subsystem).
  4. An authoring gate requires four key questions to be answered before writing any test, covering protected behaviour, plausible regressions, existing coverage, and unnecessary production seams.
  5. The skill identifies specific 'junk patterns', such as assertion-free coverage probes, self-verifying mocks, and tests that exist solely to keep dead code or test-only wrappers alive.

Why it matters

AI coding assistants frequently cause test suite bloat by generating voluminous tests that increase maintenance friction and CI runtimes. Providing agents with strict evaluation criteria ensures test suites prioritise real behavioural safety over artificial line coverage.

Analysis

OpenClaw's test reduction illustrates an emerging challenge in agentic software engineering: LLMs readily produce high test volume that meets metrics without protecting contracts. By enforcing strict gating questions and cataloguing anti-patterns, the test-audit skill prevents agents from cluttering repositories with brittle, implementation-bound tests.

Original post

Peter Steinberger 🦞

@steipete · 24 September 2026

OpenClaw deleted around 400k LOC of its own tests without much change in code coverage. Modern models just love writing tests for every tiny change, even if they aren't useful. This skill helped. t.co/a1jSBpfpns

6.7k likes231 replies10.8k bookmarks1.3m views

View on X
More posts in the thread (3)
  1. @PavelVanchugov Google rejected the update and it’s stalling. Working on it.
  2. @bvirlet It’s not meant for humans.
  3. That /goal is still running.
Selected replies (5)
  • @ZainanZhou @steipete Bill Gates has a great analogy: "Measuring programming progress by lines of code is like measuring aircraft building progress by weight." Reducing the lines of code in testing is like reducing the weight of ... the hangar. Yeah maybe it's helpful but also doesn't makes sense to
  • @akshaymarch7 @steipete A useful follow-up would be to reintroduce a few previously fixed bugs and check whether the smaller suite still catches them. That would give me more confidence in the cleanup than the coverage number alone.
  • @gauravdhiman_ai @steipete How can you trust them now, that what they did is right .. when you earlier trusted them assuming what they did was right 😄 You are just driving the car blindly without knowing when it's going to get into an accident.
  • @ChristianLempa @steipete @NousResearch did it first 😜
  • @CycleOrpington @steipete All tests are useful t.co/wNjKWr7Eci

Links and tools from this entry

Summary generated by AI (Gemini 3.8 Flash, 30 September 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • X post:Peter Steinberger

    Steering AI agents with ambitious metrics for test suite pruning

    Peter Steinberger advises against giving AI agents generic cleanup instructions, as they terminate tasks prematurely. Instead, developers should assign ambitious, measurable targets, such as removing 20 percent of the least useful tests while keeping code coverage within two percent.

    515bookmarks102.7kviews

    AI & LLMs· Opinion

  • X post:Miles Cranmer

    Ponytail: Agent Skill Against Overengineered AI Code

    Miles Cranmer highlights the open-source repository 'ponytail' as an effective prompt-based skill to prevent AI coding agents from generating bloated solutions. The project guides agents towards minimal code and native platform features instead of redundant dependencies.

    1.5kbookmarks47.5kviews

    AI & LLMs· Tool

  • Repository:DietrichGebert/ponytail

    Ponytail: Agent Skill to Prevent Over-Engineering in AI Coding

    Ponytail is an open-source tool and agent skill designed to enforce extreme minimalism and YAGNI principles in AI coding assistants, significantly reducing bloated code, token costs, and turnaround times.

    127.1kstarsJavaScript

    AI & LLMs· Tool

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.