Run bug fixes through a staged agent team
Use separate agent roles to reproduce, diagnose, review, and audit bugs before any irreversible step.
- 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.
Related agent uses
Check upgrade risks before you ship
A ReAct agent reviewed dependency data for a planned cloud upgrade and blocked it when it found an incompatible SDK version.
Use an agent to open PRs that speed up CI
A CI agent reviewed workflows and opened PRs that reduced test time and cost, while a human approved each change before merge.
Deploy a project and register a domain from one agent flow
A custom agent can set up a Cloudflare account, buy a domain, and ship an app with only brief approval steps.
Set up gated build, test, and deploy agents
A developer gave agents managed checks and deployment tools so they could build, test, and ship changes in about 10 seconds.
Build software on a cloud VM and keep browsing there
Have an agent compile software on a cloud machine, then let you log in in the browser and continue the task.
Run QA agents to search your app for bugs
Give an agent your app and test rules, and let it probe flows, file reproducible bugs, and flag risky fixes for review.