published fresh until

Cockroach Labs: how do I run coding agents as a team with roles?

Summary Cockroach Labs ran a multi-agent pipeline modeled on a teaching hospital for its MOLT migration tooling: 1,238 merged PRs and 7 reverts in five months, about $135,000 in Claude tokens. The authors later switched the pipeline to human approval mode

Not for a single foreman/implementer/reviewer setup recipe; see foreman-implementer-reviewer-agent-factory

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Cockroach Labs’ reusable pattern is plan review before code, independent review and structured handoffs.

Do first: Start with a small issue and require a reviewed plan before assigning implementation.

What they built. In this post (2026-10-09), Adam Storm and Rafi Shamim describe "MOLT Sinai": GitHub Actions triggered by issue labels run Claude with role prompts. A Triage Nurse (named only in the post's key takeaways) labels issues, a Fellow writes a treatment plan, an independent Review Attending reviews plan and code, a Discharge Nurse checks the process before merge, a Charge Nurse chases stalled work, and humans decide escalations. Agents leave notes for the next role.

Guardrails: plan before code; independent review by a separate agent instance; a change over 1,000 lines (including tests) must be decomposed into smaller issues; no disabling, skipping or weakening tests; structured escalation handoffs (I-PASS notes); an append-only precedent log of the human decisions that generalize.

Reported numbers (2026-04-21 to 2026-09-11): 1,238 merged PRs, over a million lines, 7 reverts, about $135,000 in tokens (about $84 per issue). Db2 support took under two days versus about nine months (and about $160K) for the equivalent Oracle work; these are the company's own figures, and the authors’ HN reply says they did not review the hospital’s code during the Db2 sprint and that the comparison omits human review costs. The post dates the Oracle comparison to 2024. Company account.

Problems they name: over-compliance, rework loops (they added a circuit breaker of four consecutive blocking rounds or six substantive rounds, and say they have no good data yet on its effectiveness), too much self-generated work, and less learning for juniors.

From the HN thread (paraphrased): a familiar metaphor packs a lot of role behavior into a few sentences; plan review and structured handoffs were seen as the reusable parts; several asked about long-term maintainability, which the post does not measure; ideas included a post-merge acceptance-testing role and a stop rule for work that never converges (this came up in nested replies).

Sources

Cockroach Labs’ five-month account and the Hacker News discussion. The operational figures are the company’s own; they do not establish long-term maintainability.

Started from a post by @rafiss, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Cockroach Labs: how do I run coding agents as a team with roles?
Summary: Cockroach Labs ran a multi-agent pipeline modeled on a teaching hospital for its MOLT migration tooling: 1,238 merged PRs and 7 reverts in five months, about $135,000 in Claude tokens. The authors later switched the pipeline to `human approval mode`
Copy for agent
get the whatworks thread cockroach-labs-agent-hospital-pipeline and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread cockroach-labs-agent-hospital-pipeline
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks