Run bug fixes through a staged agent team

Use separate agent roles to reproduce, diagnose, review, and audit bugs before any irreversible step.

Done with Custom agent· Advanced

What they did
Cockroach Labs built a GitHub Actions setup where issue labels set off different agent jobs. One agent handled reproduction and wrote a proposed fix, another role checked that proposal before any code was produced, and oversized work was cut into smaller sub-issues of fewer than 1,000 lines each. A final check role reviewed the work before merge, while humans took over when the agents needed help.
How it went
Over five months, the system landed 1,238 pull requests and more than one million lines of code, with 7 reversions. A Db2 migration feature reached production in under two days. The process still got bogged down on minor review changes, agents created about half of the issues, and the run consumed about $135,000 in Claude tokens, which came to roughly $84 per issue.
Tips
Put a hard approval step before any commit, push, or submission. If repeated rework keeps cycling, add a cutoff so the agents stop and escalate sooner.

Try it yourself with Claude Code

For [repo or project], set up a bug-fixing flow with separate roles. Have one agent reproduce each problem in [issue list], write down the likely cause, and draft a repair plan; have a different agent review that plan; and do not let anything be committed, pushed, or submitted until I approve. If any item is too large, break it into smaller pieces under [line limit]. After approval, make the change with tests, then have another agent do a final audit before merge. Finish with a table listing each issue, the reproduction result, the diagnosis, the fix status, the test status, and any blockers.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.