All insights
Practice AI Product Building AI Agents Architecture

Point a second agent at the first agent's failure log and the system repairs itself overnight

YC's text-to-SQL agent kept hitting edge cases; a second agent that reads each day's successes and failures and opens pull requests overnight turned a static tool into a self-improving one

Tom Blomfield (General Partner, Y Combinator) — "Building And Structuring An AI Native Company", Startup School Paris · · 5 connections

YC holds data on 7,000 companies, 20,000 founders and hundreds of thousands of applications, and built an English-to-SQL agent over it a year or two ago. Blomfield describes that first agent as merely useful — it made him perhaps 10-20% more productive and saved hiring a data analyst — and it kept hitting edge cases, permission issues, and missing database indexes. The change he calls a “head explosion moment” was a second agent layered on top: it runs overnight, reads every query a human ran that day, sorts them into successes and failures, and opens pull requests fixing the previous day’s problems. Run the same query the next morning and it works.

The generalisable move is that the failure log is already a specification for the next version of the system, and reading it is a job an agent can hold. Blomfield notes the same pattern applied to product telemetry — a company that ingests telemetry, finds where the product is breaking, opens pull requests and eventually auto-merges them. This is the concrete mechanism behind Without a learning mechanism you have an AI pipeline, not an AI loop and a sharper version of AI's self-improvement loop means each generation builds the next one faster applied to an ordinary internal tool rather than to frontier models. It also compounds in the way Proprietary feedback loops create moats that widen with every interaction predicts, because the failure log is generated by your own users and nobody else has it — the same asset Systems of record keep what was decided, not why — capture the reasoning at the moment a decision becomes binding argues most companies throw away.