CockroachDB's AI 'Hospital' Coded Db2 Support in 2 Days for $4K
Original: Five months treating bugs like patients and coding agents like a medical team
Why This Matters
Structured agentic pipelines may redefine cost and speed benchmarks for enterprise software dev.
Cockroach Labs built an AI agent pipeline called MOLT Sinai with hospital-style roles—Triage Nurses, Fellows, Attendings—that added IBM Db2 support to its migration tool in under 2 days for $4,172, vs. 9 months and $160K for Oracle support in 2024.
Cockroach Labs spent five months running a structured AI coding pipeline they named MOLT Sinai—a play on Mount Sinai teaching hospital and their MOLT database migration toolset. The system assigns agent roles modeled on medical staff: Triage Nurses assess incoming issues, Fellows write code, Review Attendings check it, and Discharge Nurses handle final safety checks before merging. Issues are 'patients,' merging is 'discharge,' and humans serve as Chiefs of Medicine.
The pipeline's real-world test came in April, when a single GitHub issue requesting IBM Db2 support was filed. A planning agent decomposed it into 15 sub-issues with an explicit dependency graph; two of those were broken down further. By closure, 32 sub-issues had been opened, 27 pull requests merged, reviewers had sent work back 55 times, and 9 issues escalated—only 2 to a human. The result: a new schema converter, Fetch and Verify paths, a vendored ANTLR grammar, a Docker CI image, and over 10,000 lines of test fixtures, all in under two days at a token cost of $4,172. That's 164x faster and 38x cheaper than equivalent Oracle work done in 2024.
Over five months, the pipeline processed more than one million lines of code with only 7 total reverts. The team credits strict pre-coding planning reviews, mandatory test coverage, and meticulous record-keeping for keeping regressions rare. The system also powered the Migration Assistant feature.