Quality Assurance·

Your Coding Agent Wrote 1,000 Tests. Which Ones Do You Keep?

Coding agents now write hundreds of tests per task. A triage checklist for AI-generated tests: what to keep in your regression suite, run once, or delete.

QA.tech team

Gunmetal funnel pouring many glass beads through stacked glass sieves so only a few gold beads reach a brass cup, representing triage of AI-generated tests down to the ones worth keeping.

Keep the few that guard the flows your product can't live without, verify the change itself against the running app, and let the rest go. An AI-generated test earns a permanent place only if it fails when you break the code it covers, exercises real behaviour instead of a mock, checks what the user sees instead of how the code is built, and protects something that will still matter after this pull request merges. Plenty of agent-written tests won't pass all four, and that's fine. They were cheap to write. They're not cheap to keep.

Below: why the volume jumped, a triage checklist you can run on any agent-written test, and what to do with the tests that don't make the cut.

Why your agent writes so many tests now

Because newer models check their work by writing tests, a lot of them. SemiAnalysis looked at the run logs behind Claude Fable 5.2's score on its GDPx benchmark. Its thread from 10 Nov 2026 puts the improvement down to one main thing, how thoroughly the model tests its work: "Fable 5.2 will often generate hundreds or even thousands of test cases, whereas Opus 5.5/Fable 5.1 stopped at just ~20." The same thread puts Fable 5.2's average cost per task 31% higher than Fable 5.1's ($88.15 against $67.16), even though it's 20% cheaper per million tokens.

Pull request counts climbed just as fast. In her talk "All Code Is Slop (Except Mine)", published 14 Nov 2026, Lauren Tan of the Grok Bot team at SpaceXSI said her team shipped 11,000 pull requests to production in a single month, with a revert rate holding at about half a percent. Her read is that agents make testing cheap enough to do properly: "agents let us test everything to a much greater degree than used to be economical."

The same talk credits the low revert rate to groundwork that came before the volume: lint rules, architecture, and a lot of verification. Writing a test costs almost nothing now. The bill arrives later, when the test runs on every commit for the next three years.

Teams feel it already. At one consumer app company, iOS has less unit-test coverage than web, and the mobile engineering lead told us: "so our agents are adding unit tests, but we are not quite sure actually that those unit tests are good." We hear versions of that often. Coverage is going up. Confidence isn't, yet.

Why more tests can mean less signal

Start with the one that's easiest to miss.

The agent tests its own assumptions. A test written in the same session as the code inherits the code's idea of what correct means. If the agent misread the ticket, it misreads it twice: once in the implementation and once in the assertion. Vilhelm von Ehrenheim, who co-founded QA.tech and leads its AI work, made this point at CTO Craft in October. When the same agent writes the tests and the implementation, the risk of bias stays high, so you need some verification on top that the agent loop doesn't control.

Volume makes noise. Take an illustrative 1% chance that any end-to-end test fails for reasons unrelated to the code, such as a slow response or a third-party script timing out. A thousand of those tests average ten spurious reds per run, and the odds of a fully green run are close to zero. If only a handful of them touch the change, run that handful and leave the rest. Unit tests flake far less, but a thousand of them still has to be read, maintained and updated every time a function signature moves.

Suites only grow. Hardly anyone deletes a test that passes. On a customer call in October, one of our team described where that ends: regression tests build up until there are a thousand, two thousand, three thousand of them, and at that point they're hard to maintain at all. A coding agent that writes hundreds of tests per task gets you there in weeks instead of years. The full case is in why a large regression suite is a liability.

A triage checklist for AI-generated tests

Run each test, or each file of tests, through these questions before it merges. Some take seconds. The first one takes a minute and is worth more than the rest put together.

  1. Does it fail when you break the code? Revert the change, flip a condition, or return a wrong value from the function under test. Then run the test. If it stays green, it isn't testing that code. Delete it. Mutation testing tools do this at scale, but doing it by hand on a sample of ten tells you a lot about the other 990.

  2. What's mocked? Read the setup before the assertions. If the mock returns exactly what the code expects and the test then asserts that value, the test checks the mock. Agents like this pattern because it can't fail. Mocks for slow or external things (a payment provider, the clock) are fine. Mocking the thing the test claims to cover is not.

  3. Does it check behaviour or implementation? Asserting that a private method was called twice, or snapshotting a block of markup, breaks on the next refactor while the feature still works. A test that asserts the total is right, the error shows or the record saved will survive one. The second kind is worth keeping. The first is a maintenance cost with a green tick on it.

  4. Does it touch the change? An agent asked to "add tests" will add them wherever testing is easiest, and that may not be the risky part of the diff. If nothing in the test exercises a line or a flow the PR changed, it's padding for this PR, whatever its long-term value.

  5. Is it a copy of something you already have? Search for an existing test of the same behaviour. An agent that doesn't look first will happily write the same check a third time.

  6. Would anyone notice if this flow broke for a day? If the answer is "everyone, within the hour" (sign-up, login, payment, the core thing your product does), the test is a candidate for the scheduled suite. If the answer is "only the person who made this change", it belongs to this PR and nowhere else.

A test that passes 1 to 3 is a real test. Whether it stays is decided by 4 to 6.

An engineering manager at a mobile app studio has built this into his pipeline as a human gate. The agent "writes the potential test cases, sends it to a reviewer, a human reviewer, which is a Qa", and that person decides which new tests go in and how the old ones change. A checklist like the one above is what makes that review take minutes instead of an afternoon.

Keep, run once, discard

After the checklist, every test lands in one of these.

Keep: the critical path, plus unit tests that earned it. The scheduled regression suite should stay small and hold only the flows from question 6, the ones everyone would notice within the hour. Unit tests that fail when the code breaks, check behaviour, and run fast can stay too. They're cheap per run and they guard logic. The decision table in what to replace, optimize and keep in your regression suite helps you draw the line for end-to-end tests.

Run once: everything that verifies this change. A lot of what an agent writes is perfectly good for answering one question, "does this change work?", and pointless after that. Say the agent rewrote a date-range filter and generated 300 cases covering time zones, leap years and empty ranges. Run all 300 against the change. Read the failures. Then don't schedule them every night forever. Our CEO, Daniel Mauno Pettersson, makes the point on calls: test a new sign-up flow in depth the first time, every country if you like, but don't rerun that matrix on every commit for the life of the product. If the same area changes next month, generate again from next month's diff.

Discard: everything that failed the first three questions. Don't quarantine tests that never tested anything. Delete them and write one line in the PR saying why. The Claude Code team's verification post (Addy Osmani, 16 Nov 2026) has a rule worth copying for flaky tests. Claude can't skip them, add sleeps or retry until they pass. If it can't find the root cause, "it deletes the test and writes down why." For tests that are merely old rather than broken, when to kill a test covers the audit.

Some tests sit between piles. A test created to verify a PR might turn out to cover a main flow nobody had a test for. Promote it after the merge, on purpose, with an owner. How PR test cases become your regression suite has the promotion rule we use.

What a pile of unit tests still can't tell you

Whether the product works for a user. A thousand green unit tests say the functions behave the way the agent thought they should. They don't open the app.

Osmani's post says which kind of test the Claude Code team leans on: "If you have to focus on one test type, pick end-to-end… they are difficult to fool–either the whole feature works or it doesn't." And: "Running the app end to end matters more than tests."

There's a workload question under this too. Cassandra H. Leung, a tester who also works on her company's AI enablement team, wrote on 11 Nov 2026 that testers are drowning in backlogs because "developers are churning out more merge requests and sending more tickets for testing quicker than ever before." Her argument is that the fix is culture, with developers testing their own work and understanding risk, and that AI "just makes the pain worse, and more visible." A coding agent that writes 1,000 tests can look like the answer to that backlog. It isn't, unless someone checks that those tests test the right thing.

Where an outside verifier fits

The tests an agent writes for itself are a first pass. The check that decides the merge should come from something that didn't write the code.

We built dynamic PR testing in QA.tech for that job. It won't judge your unit tests, and it needs a running build to test against. It reads the pull request and reuses whatever existing test cases already cover the user-facing change. Where nothing does, it writes new ones, then runs the lot against the PR's preview deployment (or against staging after merge). How deep it goes scales with the change's risk, and the docs note that bug fixes and refactors often create zero new tests. The result posts on the PR as pass, fail or unable to verify, with screenshots, logs and a step-by-step trace behind it.

Tests it creates are saved with an ephemeral label, so they're easy to tell apart from the suite you schedule. After a GitHub or Azure DevOps merge, a post-merge agent can promote the ones worth keeping, and each promoted test carries the regression and auto-added labels, so you can tell later how it got into the suite. The agent that wrote the code stops getting the last word on whether it works. If you want that record in the PR itself, our pull request template with a verification section shows where it goes.

FAQ

Should you keep the tests an AI coding agent writes?

Some of them. Keep tests that fail when you break the code, check behaviour rather than implementation, don't just test a mock, and cover something that will matter after the PR merges. Run change-specific tests once against the change, then let them go. Delete tests that never tested anything.

How do you tell if an AI-generated unit test is any good?

Break the code it covers and run it. If it still passes, it's not testing that code. Then read the setup: a test whose mock returns the value it later asserts is checking the mock. Finally, check whether it asserts behaviour (a correct total, a visible error) or implementation (a private call count). Behaviour tests survive refactors.

Why do AI-generated tests pass but miss bugs?

Because the agent writes the test from the same understanding as the code. If it misread the requirement, the test encodes the same misreading and passes. Heavy mocking makes it worse, since a mocked dependency returns whatever the test set up, which is what the code expects. A check written from the ticket and run against the real app doesn't share those assumptions.

How many tests should a coding agent write for a change?

There's no right number. In SemiAnalysis's runs, earlier models stopped at about 20 test cases while Fable 5.2 often wrote hundreds or thousands. What matters is whether the tests exercise the risky parts of the change and fail when those parts break. A small change to a peripheral screen needs far less than a change to checkout.

Should AI-generated tests go into the regression suite?

Only the ones that guard a critical flow, pass the triage checklist, and have a named owner. Everything else is verification for one pull request. Promoting every generated test turns the suite into the slow, flaky pile you were trying to avoid.

Do AI-written tests replace testers?

Generating tests got cheap. Deciding which tests matter, what was missed and whether the product actually works for a user did not, and that judgment is still the tester's job. In Cassandra Leung's experience, teams where developers test their own changes and understand risk keep up. Teams that throw tickets over a wall drown, with or without AI.

Your team moves fast. Can your testing keep up?

Our QA agents test your product autonomously, so moving fast never means shipping broken. Start free or get a 30-minute demo.