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.
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
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.