Skip to content
agentusehub

Run coding agents like a medical team to fix bugs

Over five months, the author treated bugs like patients and organized coding agents as a hospital-style team to diagnose and fix them.

Time saved
Not reported
Setup time
Not reported
Running cost
Not reported
Cost range
Not reported

Use case overview

Over five months, the author treated bugs like patients and organized coding agents as a hospital-style team to diagnose and fix them.

Reported experience

  1. What they did

    Cockroach Labs built a GitHub Actions pipeline in which labels on an issue trigger role-specific agents. A Fellow reproduces the bug and posts a treatment plan, and a separate Review Attending approves or rejects it before any code is written. Large issues are split into sub-issues of under 1,000 lines each. A Discharge Nurse audits the review before merge, and humans handle escalations.

  2. How it went

    Over five months it merged 1,238 PRs and over a million lines of code with 7 reverts. A Db2 migration feature shipped in under two days. Reviewers sometimes looped on trivial fixes, and agents filed about half of all issues.

  3. Worth knowing

    It used about $135,000 in Claude tokens, around $84 per issue. Some issues went 9 to 11 rework rounds before a circuit-breaker was added.

Example prompts

Try with Claude Code
Treat the bugs in this repo like patients in a hospital. For each bug in [issue list or file], have one agent triage and reproduce it, another diagnose the root cause, and another write a fix with a test, then have a separate reviewer check the fix. Finish with a summary table of each bug, its diagnosis, the fix and test status, and pause for my approval before committing or pushing anything.
Software & DevOps

Port a Chrome extension to Safari

The author had ChatGPT take the Session Buddy extension source from Chrome, port it to Safari and install it, taking about 20 minutes.

ChatGPT