Five months treating bugs like patients and coding agents like a medical team
TL;DR Highlight
Modeling a coding-agent pipeline on a teaching hospital yielded 1M+ lines merged in 5 months with only 7 reverts.
Who Should Read
A backend developer who hesitates to merge agent-written code into production and is designing review and approval gates.
Core Mechanics
- Db2 support took two days
- The Oracle support took 9 months and about $160K in engineering time, while Db2 took under 2 days and $4172 in tokens.
- The post calls this 164x faster and 38x cheaper.
- No human wrote any of the code.
- A hospital metaphor defined the roles
- Issues are patients, merging is discharge, and humans are the Chiefs of Medicine.
- Roles like Triage Nurse, Fellow, Review Attending and Discharge Nurse each have their own prompt (skill file).
- Everything runs on GitHub Actions and issue labels.
- No code before a reviewed plan
- The Fellow reproduces the bug and posts a treatment plan, and a different agent instance approves or rejects it.
- Plans are rejected under 10% of the time, but it is the highest-value review because it moves rework earliest.
- If scope changes, the Fellow stops and re-posts the plan ("Don't improvise").
- Tests can't be touched
- Agents may not disable, skip, weaken or modify a test to make it pass.
- Any needed test change goes in its own commit and is reviewed separately.
- Code review starts by disabling the change and checking that new tests fail.
- Stuck agents hand off with I-PASS
- A stuck Fellow doesn't try harder; it writes a structured I-PASS handoff and escalates to an Attending.
- The receiver must write back what it understood before starting.
- Human Chief decisions go in a precedent log that agents must read before escalating.
- The Discharge Nurse audits the reviewer
- The last gate doesn't re-review code, it verifies the review process with a checklist.
- It checks approval, review template, unresolved threads, CI and commit history.
- If any box can't be checked, discharge fails.
- Skill files became legacy code
- A July audit of 25 files (about 100,000 words) found 23% (about 23,000 words) removable without changing any gate.
- The Discharge Nurse loads about 21,800 words (roughly 29,000 tokens) on every run.
- Cost: about $135,000 in Claude tokens over 5 months, around $84 per issue.
Community Reactions
- A role frame is an efficient compression
- One commenter said the teaching-hospital metaphor encodes complex role relationships far more efficiently than spelling each one out.
- The takeaway: borrow systems the LLM knows well with "act as though you're ___".
- Cost sustainability pushback
- One commenter calculated humans at about $600/day versus about $2086/day for the AI factory and called it unsustainable unless revenue triples.
- Another joked that $135,000 in tokens is just like a US hospital bill.
- No evidence on long-term quality
- Commenters said they saw no data on long-term quality or maintainability, only agent talk.
- Another was skeptical that LLM roleplay is the secret to great code.
- Using Redmine instead of GitHub issues
- One commenter said a lightly customized Redmine works very well for review, UAT and answering agent questions.
- Another described adding a post-merge acceptance-testing agent.
How to Apply
- Give your reviewer a fault-finding persona
- Add a separate reviewer instance to your current code-generation flow today.
- Start with "You are a different instance from the author. Find bugs, regression risks and plan deviations."
- Paste the codeExample below to try it.
- Add a plan gate before implementation
- Make the agent write diagnosis, files to change, tests to add and risks first.
- Block implementation until another agent approves, using a label or status field.
- Cap changes at 1,000 lines and lock tests
- Instruct the agent to split work into sub-issues if the estimate exceeds 1,000 lines.
- Write "never disable or weaken tests; use a separate commit if needed" into the skill file.
- Audit prompt files for duplication quarterly
- Find rules repeated across your skill or system prompts and delete them.
- Start with files loaded on every run.
Try It
# Paste into Claude or ChatGPT (simplified version of the method: plan review + fault-finding reviewer)
You are a Review Attending. You are a different instance from the agent that wrote this code. Your job is to find defects, not fix them. Look for bugs, security issues, regression risks, and deviations from the approved plan.
[Approved plan]
{{treatment plan: diagnosis, files to change, tests to add, risks}}
[Change (diff)]
{{diff}}
Rules:
1. Flag any sign that a test was disabled, weakened or modified.
2. Reason about whether new tests would fail if the change were reverted, and flag tests that wouldn't.
3. Flag out-of-scope changes.
Output: approve or reject, plus a list of reasons.
Next step: add a stage before the diff saying "write only the treatment plan and stop", and only implement after the plan is approved.Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques