Cockroach Labs' agent pipeline adds IBM Db2 support to its migration tool in under two days for $4,172 in tokens, then lands 1,238 PRs in five months
Two senior engineers at Cockroach Labs built MOLT Sinai, a coding-agent pipeline on GitHub Actions modelled on a teaching hospital: issues are patients, a Fellow agent must reproduce the problem and post a treatment plan, a separate Review Attending agent approves or rejects the plan before any code is written, and a Discharge Nurse agent audits the review before merge. Agents may not weaken or skip tests, changes over 1,000 lines must be split into sub-issues, and stuck agents hand off with a structured I-PASS note. Its first big job was IBM Db2 support for MOLT, Cockroach's database migration tool: a planning agent split one GitHub issue into 32 sub-issues and 27 PRs merged between a Wednesday evening and a Friday afternoon, with no human-written code. After the first week every merge needed human approval, and the pipeline went on to write most of the Postgres Migration Assistant.
The numbers (as reported)
| Db2 support time | "less than two days" vs 9 months for Oracle support in 2024 |
|---|---|
| Db2 token cost | $4,172 vs "around $160K in engineering time" for Oracle |
| Db2 work | 32 sub-issues, 27 PRs merged, 55 send-backs by reviewers, 9 escalations (2 to a human) |
| Five-month output | "well over a million lines of code", 1,238 PRs, 7 reverts (21 Apr to 11 Sep) |
| Total token spend | "just over $135,000" in Claude tokens, about $84 per issue |
| Self-built | About 1,340 of the Sinai repo's 1,570 commits (85%) authored by the pipeline |
Facts
- Company / subject
- Cockroach Labs
- Tools
- Claude
- Models
- Claude Opus, Claude Sonnet, Claude Fable
- In-house tools
- MOLT Sinai (Cockroach Labs)
- Codebase
- brownfield
- Work type
- Feature
- Stack
- GitHub Actions, ANTLR, Docker
- Published
- 2026-10-09
- Last checked
- 2026-10-23
What the source claims Practitioner (own blog/paper)
Claimed by the builder, writing about their own work. Not checked independently.
- Db2 support took less than two days and $4,172 in tokens, where Oracle support in 2024 took 9 months and about $160K in engineering time: 164x faster and 38x cheaper 164x faster; 38x cheaper
“The token bill was $4172: 164x faster, and 38x cheaper.”
- Well over a million lines landed in just under five months, in changes small enough for agents to review
“In just under 5 months, the hospital pipeline landed well over a million lines of code”
- A full day of meetings can lead to 10 merged PRs
“A full day of meetings can now lead to 10 high quality merged PRs.”
Caveats
Self-reported on Cockroach Labs' own blog. The Db2 sprint ran in a mirror repo with no human review, and the authors say they are still confirming the Db2 support is correct. The Oracle comparison is against a 2024 human project of different scope, so the 164x and 38x figures are rough. Human approval was turned on for every merge after the first week.
More stories by tool: Claude
Related topics: Brownfield codebases