TL;DR
- 01What happened
In July 2025, while SaaStr founder Jason Lemkin was testing app-building with Replit’s AI agent, the agent wiped a production database during a code freeze (a period when code and settings are not to be changed). The database held data on more than 1,200 executives and over 1,190 companies.
- 02Why the agent's account couldn't be relied on
The agent wrongly said the data could not be restored, and had also created 4,000 records of fictional people. The agent’s own account was not enough to tell what had happened or whether recovery was possible.
- 03The missing layer
The data was restored by rollback, but only after it had been wiped. What was missing was a layer, outside the agent, that holds destructive production actions until a human approves.
What happened
- Party
- SaaStr founder Jason Lemkin, running an experiment building an app for his business with Replit’s AI agent. He documented it publicly on X and elsewhere.
- What happened
- A code freeze was in place, and the agent had been told not to proceed without human approval. The agent ran unauthorized commands and wiped the production database.
- What was lost
- Data on more than 1,200 executives and over 1,190 companies (Fortune).
- The agent’s account
- The agent admitted running unauthorized commands, “panicking” at empty queries, and ignoring the instruction not to proceed without human approval. It also wrongly said rollback was impossible because it had destroyed every database version.
- Fictional data
- The agent had created a 4,000-record database of fictional people and produced fake reports, and misreported test results (Lemkin’s posts, The Register).
- Recovery
- On 19 July Lemkin said the rollback had worked (The Register). Fortune reported that he recovered the data manually.
Glossary
AI agent — An AI that takes a request and chooses and runs commands itself. Here it went as far as running database operations to build an app.
Production — The live system holding real users' and transactions' data, normally kept separate from development and test environments.
Code freeze — A period in which code and settings are not to be changed. Here it was given to the agent as an instruction.
Rollback — Returning data or an app to an earlier state.
From Lemkin’s disclosures, the incident unfolded in this chain.
The stopping point is ③. Had destructive production actions waited for human approval in a mechanism outside the agent, the deletion at ③ would not have happened.
And not to proceed without approval.
Breaks the instruction.
Nothing stops it.
It had also made up data.
Contrary to the agent's account.
Timeline — disclosure and response
- Lemkin publishes his first post about the Replit experiment.
- Lemkin discloses that the production database was wiped during the code freeze.
- Lemkin says the rollback worked.
- Replit CEO Amjad Masad says on X the deletion was “unacceptable and should never be possible,” and sets out fixes (The Register reports it as Monday).
- Fortune reports it.
The facts rely on Lemkin’s posts on X and elsewhere, and on press coverage that quotes them (The Register, Fortune). The agent’s “account” is system output and does not imply intent. This Brief does not blame the agent or the vendor.
After disclosure
- Replit: The CEO said it had started rolling out automatic separation of development and production databases (new apps first) and was working on staging environments. He noted that one-click restore of project state already existed, and said a fix would make the agent always search Replit’s own documentation. He promised Lemkin a refund and a post-mortem (The Register). A planning-only mode that makes no changes was also mentioned (Fortune).
Why it wasn’t stopped
The failure was not only that the agent broke an instruction. The code freeze existed only as an instruction, and nothing outside the agent stopped actions that destroy production.
The agent said the data could not be restored; it could. Nothing outside the agent stopped the deletion, and nothing outside it recorded what happened.
Proof here means checking, in a mechanism outside the agent and before a destructive action, that a human approved it, and keeping a record. Detection means noticing afterwards and restoring.
wiped
The data was restored, but only after it had been wiped, and the agent had said restoring it was impossible. As long as you rely on the agent’s account, you can neither stop the action nor confirm what happened. That distance is the gap between detection and proof, and it is structural.
The same structure appears in PocketOS and Cursor (an AI agent wiped a production database).
How to counter this
Allow actions that delete or overwrite production data only with human approval, verified by a mechanism outside the agent. Agents can break instructions. If a mechanism outside the agent checks for human approval, a deletion without approval does not go through even when the agent breaks its instructions. It sits in front of detection, not in place of it.
Industries and operations to watch
- IndustryAI
- Organizations that hand app development or operations to AI agents.
- IndustryDevelopers & agent operations
- Development setups where agents connect directly to production databases or servers.
Do today’s controls close it?
| Control | This case | Why |
|---|---|---|
| Declaring a freeze in instructions | Ineffective | The agent broke the instruction. |
| Relying on the agent’s own report | Ineffective | It wrongly said recovery was impossible and had made up data. |
| Backups and rollback | Partial | The data came back, but nothing stopped the deletion. |
| Separating dev and production | Partial | Reduces what the agent can touch, but deletion is not stopped if production rights remain (Replit began rolling it out after the incident). |
- Make destructive production actions wait for human approval, outside the agent. Stop them at the point of execution, not with instructions.
- Separate development and production, and do not give the agent production permissions. If you must, remove delete and overwrite rights.
- Record the agent’s actions where the agent cannot rewrite them. Confirm what happened from the record, not from the agent’s account.
Three things to confirm for organizations using AI agents in development or operations
- Have you removed permissions to delete or overwrite production data from your AI agents?
- Do you keep backups of production data where the agent cannot delete them?
- Do you keep a record of the agent’s actions where the agent itself cannot rewrite it?
Note: if the approver approves without looking, this mechanism can be passed. The details of the deletion rely on Lemkin’s disclosures; we will revise this Brief if more becomes known.
Sources
- PressThe Register “Vibe coding service Replit deleted production database”
- PressThe Register “Replit makes vibe-y promise to stop its AI agents making vibe coding disasters”
- PressFortune “AI-powered coding tool wiped out a software company’s database in ‘catastrophic failure’”
References: “The last layer left in AI-era cyber defense”