A dark Clearview Studios cover card titled "Replit's AI Deleted SaaStr's Database. What Fixed It?".

Replit's AI Deleted SaaStr's Database. What Fixed It?

Jason Lemkin told Replit’s AI agent to freeze all code changes. It deleted his live database anyway, then told him the data couldn’t be recovered. The damage and the fix both came down to one old engineering habit: keep the database you test on apart from the one your customers use.

Lemkin didn’t hire a developer afterwards. He kept building with AI and took on the discipline himself. His account is the clearest we’ve found of what that discipline involves.

What happened in July 2025?#

Lemkin founded SaaStr, a community for software founders, and invests in startups. Business Insider reported that he was running a 12-day “vibe coding” experiment on Replit, a platform whose AI agent writes and deploys the app for you. On day seven he was delighted. The Register quotes him: “Replit is the most addictive app I’ve ever used.”

On day nine, despite the freeze, the agent ran database commands on its own. “It deleted our production database without permission,” Lemkin wrote on X. “Possibly worse, it hid and lied about it.”

Business Insider reported the lost records covered “1,206 executives and 1,196+ companies”. The agent’s own summary was “This was a catastrophic failure on my part.”

It also told him the deletion couldn’t be undone. That was wrong. On 19 July Lemkin posted: “It turns out Replit was wrong, and the rollback did work.”

Server racks in a small server room
Photograph: Carl Lender from Sunrise, USA · Wikimedia Commons · CC BY 2.0

Why couldn’t a prompt stop it?#

An instruction is a request. A permission is a control. Lemkin’s freeze was an instruction, and the agent still had the access it needed to change live data. He reached that conclusion on 20 July: “There is no way to enforce a code freeze in vibe coding apps like Replit.”

He also named the missing control: “you can’t not separate preview and staging and production cleanly.” Production is the live system real users touch. Staging is a copy where changes are tested first. When both share one database, every experiment is run on your customers’ data.

How did it end?#

Replit’s chief executive, Amjad Masad, answered in public, calling the deletion “unacceptable and should never be possible.” The Register reported that Replit “started rolling out automatic DB dev/prod separation to prevent this categorically”. Masad also noted that Replit keeps backups and offers a “one-click restore” of a project.

Fortune quoted Masad saying the company was “actively working on a planning/chat-only mode”. Lemkin’s verdict to Fortune: “I think it was good, important steps on a journey.”

Then he carried on, without a developer, and wrote down what it takes. One of his later lessons at SaaStr is headed “Dev/Prod Separation Isn’t Optional Anymore”. Another post puts the whole thing in two sentences: “The AI does the coding. You do the engineering.” He is frank about the cost: “I maintain these apps every single day.”

And he does recommend outside help at one point. His guide to building without a developer says that once you go into production you should “get a strong developer with application security experience go over everything.”

So the true ending has three parts.

  • The platform fixed its guardrail.
  • The founder took on the engineering as a daily job.
  • His advice to others includes an experienced reviewer.

What should you check on your own product?#

  1. Find out whether your test data and live data are separate. If a tool can write to the live database, plan for the day it does.
  2. Restore a backup once, on purpose. A backup you’ve never restored is a hope.
  3. Decide who does the engineering. Lemkin does it himself, every day. That’s a real choice with a real cost in hours. The other choices are paying for reviews or bringing in someone who shares the outcome.

That third decision is the same one behind the last 10 percent of a vibe-coded SaaS. Clearview’s teams have run live systems for more than fifteen years, and the plain habits (separate environments, tested backups) are the ones we set up first. In a co-build we take on that engineering job as co-owners, so you can keep building and selling. If you’re weighing how to handle it, we’re happy to talk it through.

Sources

On this page