Failed test repair agent
Point it at a red test suite. Get capped rounds of fixes, re-checked each time, until green or stopped.
Failed test repair agent is a free AI agent for the job "Test and fix code". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · Made by AI Blocks · Thinking: high
What it does
A red test suite is easy to fix badly. It is easy to retry a flaky test until it goes green, loosen a check, or make five changes at once and not know which one worked. Fixing tests with an AI can also turn into a loop of near-identical patches that never change the result. This agent works in capped rounds. It takes a baseline first, then fixes one group of failures at a time and runs the suite after each fix. It picks its path from what it sees: a check that fails only in the pull request gets the cause found first, a browser test that fails sometimes gets a flaky-test fix, and a failure that keeps coming back gets a three-try budget. It stops when the suite is green, the rounds run out, or it is going in circles. It leaves the fixes uncommitted for you to…
You give it
- The code, in a folder or repository it can run
- The command that runs your tests
- The failing output or the failed check, if you have it (optional)
- A list of tests you already know are flaky (optional)
- A buyer brief (optional)
You get
- The failures before and after, with a full final run
- One line per round, with the group, cause, change and result
- A diff of the changes, left uncommitted for you
- A list of what is still failing and the decision each one needs
Use it when
- Your tests are red after a change and you want them fixed without the guesswork.
- A pull request check fails and you do not know why.
- You have flaky browser tests and want the cause fixed, not retries added.
How to use it
- Start a chat with the agent. In Claude Code, add it as a skill or save it in .claude/agents, then point it at your project.
- Tell it the test command the first time. It saves it.
- Let it run. It stops by itself at the limit.
- Read the diff and the list of what is still failing. Decide on any test that looks out of date.
- Commit the changes yourself when you are happy. It will not.