The bug-to-fix loop
A bug report used to be the start of a conversation. Someone saw something wrong, wrote two lines about it, and a developer had to start by working out which page, which browser and which click. Then the fix shipped, and nobody checked that path again until a customer found the same bug a month later.
That loop was slow, but it was survivable when people wrote all the code. It is not survivable when a coding agent writes most of it. This guide describes the loop that replaces it: what it is, why it matters now, the five parts it is made of, and how to run it.
What the bug-to-fix loop is#
The bug-to-fix loop is the path a bug takes from the moment someone sees it to the moment it can no longer come back unnoticed. It has five parts:
- Capture with evidence. The bug is reported where it happened, with what the browser knew at that moment.
- Hand-off to the agent. A coding agent reads the bug, evidence and all, as the starting point for the fix.
- Proof the fix works. The fix is checked in a real browser, not just reviewed.
- A regression test. The check becomes a test that keeps running, so the bug stays fixed.
- Watching production. The tests run on a schedule and after every deploy, and someone hears about a failure the same day.
Each part closes a gap the old way left open. Skip one, and the loop leaks: a bug without evidence stalls at hand-off, a fix without proof is a guess, and a fix without a test is temporary.
Why it matters now#
Coding agents changed the economics of writing code. Writing a change is no longer the slow part, and a team ships far more change each week than it used to. Review has not kept pace, and it cannot: review reads what a change means to do, and it cannot click through checkout.
Three things follow, and most teams feel all three:
- Bugs arrive without evidence. The person who saw the bug is rarely the person who fixes it, and "checkout is broken" gets a question back, not a fix. An agent has the same problem, only faster: give it a vague report and it will confidently fix the wrong thing.
- Agents write code faster than anyone can check it. An agent can touch many files while working on one bug. The more change lands each day, the less anyone rechecks by hand.
- The same bug comes back. A regression is something that worked yesterday and does not today, and it is rarely in the file that changed. Without a test on that path, the only alarm is a customer.
The loop answers each of these with a step that runs whether or not anyone remembers to do it.
Capture with evidence#
A useful bug report has four things: the page, the steps that led there, the console errors and the failed network requests. The browser already has all four. The job of capture is to take them at the moment of the bug, so nobody has to reconstruct them later.
Good capture looks like this:
- One action to report. If filing a bug takes more effort than mentioning it in chat, people mention it in chat, and the evidence is lost.
- Context collected for you. The last clicks and navigations, the console and the network are kept in memory while you browse and attached when you file.
- A picture, marked up. A screenshot with the problem circled says more than a paragraph; a short recording shows a bug that only happens in motion.
- Wherever people are. Bugs are found on phones as often as on laptops, and the report should not depend on the device.
The test of good capture is simple: can the person or agent fixing the bug start without asking a single question? Our post on bug reports developers can act on goes through what to capture and why.
Hand-off to the agent#
Once a bug carries its evidence, it can go to a coding agent instead of a queue. The agent needs to read the bug the way a developer would: the title, the screenshot, the steps, the console error and the failed request. It needs to do that from its own session, without a person copying text between windows.
That is what the Model Context Protocol (MCP) is for. An MCP connector gives the agent tools to list open bugs, read one in full, comment on it and change its status. With it, a session goes like this: the agent reads the bug with its evidence and looks for the cause in the repository; once you or it has made the fix, it explains the change in a comment and marks the bug fixed.
Two rules keep the hand-off safe:
- The agent acts as the person who connected it. Their project role applies to everything the agent does.
- Fixed is not verified. The agent can say a bug is fixed; the reporter, or a test, says it is verified.
Our post on giving AI coding agents your bug tracker covers this step in more depth, and Set up with your coding agent walks through connecting one.
Proof the fix works#
A fix is a claim. The proof is the same path the bug took, run in a real browser, ending in the outcome a person cares about: the promo code applies, the invoice sends, the page loads.
Proof has two requirements that are easy to miss:
- It starts fresh. A check that passes only in the session where the bug was fixed proves nothing about the next customer.
- It can fail. A check that would pass on a broken page protects nothing. The only way to know is to break the page on purpose and watch the check fail. That shows the check can fail, not that it checks the right thing: one that only looks for a message will not notice a wrong total, so read what it asserts.
When a coding agent writes the check, the same rules apply, and they matter more: an agent can write a test that passes by asserting nothing. Our post on testing what Claude Code wrote before you merge it shows what that looks like in practice.
A regression test so it stays fixed#
The check that proved the fix is worth keeping. Every bug you fix marks a test you were missing; write it from the report, and that bug cannot return unnoticed.
A regression test earns its place when it:
- Drives the product the way a person does, through the page, not by calling functions behind it.
- Names elements the way people see them, by their role and visible label, so a styling change does not break it.
- Asserts the outcome, not just that each click succeeded.
- Runs without a model. Once a test is written, replaying it should be repeatable and cheap, with no model deciding anything.
Tests also need care when the product changes on purpose. A button renamed from "Apply code" to "Apply promo code" breaks a good test for a good reason. The test should be repaired, and a person should approve the repair: a test that rewrites itself to pass is hiding a bug, not fixing one. Our post on self-healing tests explains where the line is.
Watching production#
Tests that only run when someone remembers are a hope, not a safety net. The last part of the loop runs them on their own:
- After every deploy, from your CI pipeline or from your Git host's deployments, so a regression is caught before most customers meet it.
- On a schedule, against production, so a change outside your code (a third-party script, an expired key, a data problem) still trips an alarm.
- With a message that says what broke. A failure should reach the team's channel naming the test and the failing step, with its screenshot.
And when a test fails, it should feed the start of the loop again: the failing step's evidence is exactly what a good bug report needs.
How it differs from plain QA#
Traditional QA is a stage: code is written, then handed to people who test it, then released. The bug-to-fix loop is not a stage; it runs all the time, and most of it runs without a person.
| Plain QA | The bug-to-fix loop | |
|---|---|---|
| When it happens | Before a release | On every bug and every deploy |
| What a bug report carries | What the reporter remembered | The page, steps, console and network, captured |
| Who fixes it | A developer, after questions | A coding agent or a developer, with the evidence |
| How the fix is checked | Someone clicks through it again | A test in a real browser that has been shown to fail when the page breaks |
| What happens next time | The same manual check, if someone remembers | The test runs on schedule and after every deploy |
People still matter in the loop, at the points where judgement does: deciding what is worth testing, approving a repair, and verifying that a fix is what the reporter meant.
How TestFinch runs the loop#
TestFinch is two products built for this loop, in one workspace.
- Snag captures. A Chrome extension files a bug with a marked-up screenshot or a recording of up to 90 seconds, and attaches the last steps, console errors and failed requests itself. The phone app and the share sheet report from a phone. Bugs land on a board, from Inbox to Verified.
- Your agent gets the evidence. Claude Code, Codex, Cursor or any MCP client connects to the TestFinch connector and reads a bug with its evidence, and once you or it has made the fix, marks it fixed.
- FlowQA checks and keeps. FlowQA's AI agent explores your site and writes tests; each explored test is kept only if it passes twice on fresh sessions and then fails on a page broken the way its own assertions describe. A test whose only assertion is a URL cannot be broken from inside the page, so it skips that run and is marked as unchecked. A bug can also become a test from the trail Snag captured, and a coding agent can write and save tests itself; every save is checked, and a test with no assertion comes back with a finding to resolve. Tests run on Chromium, on our cloud browsers or in FlowQA Desktop on your own machine, at desktop sizes or at tablet and Android phone sizes emulated in Chromium, and on throttled networks.
- FlowQA watches. Tests run on schedules, from CI and on GitHub deployments, and failures reach Slack or email. When a page changes, FlowQA proposes a repair and a person approves it.
You can start with either product and add the other later. Both are free to start, with no card.
Common questions#
Is the bug-to-fix loop only for teams using coding agents?#
No. Every part of it helps a team where people write all the code: evidence makes bugs faster to fix, and regression tests keep them fixed. Coding agents make it urgent, because they raise the amount of change faster than anyone can check by hand.
Can a coding agent really work on a bug from a report?#
Often, when the report carries the evidence. A console error that names a file and a line, or a failed request with its status, points straight at the cause. A vague report does not, and the agent should ask for more instead of guessing.
What stops an agent from writing a test that always passes?#
Two checks, though neither can tell whether a test asserts the right thing; a person still reads the assertions. A test FlowQA's AI agent writes while exploring is kept only once it passes twice on fresh sessions and then fails on a page broken the way its assertions describe; one that still passes there protects nothing and is thrown away. A test whose only assertion is a URL cannot be broken that way, and is marked as unchecked. A test a coding agent saves is checked on every save, and a test with no assertion comes back with a finding the agent has to resolve before it calls the test done.
Do we need to replace our existing test suite?#
No. Regression tests from the loop run beside what you have. FlowQA tests can be exported as Playwright tests, so nothing is locked in.
How much of the loop needs a person?#
Less than you might expect, but not none. People decide which journeys are worth testing, approve repairs when a page changes on purpose, and verify that a fix is what they meant.