Skip to content

Risk · Report

An AI agent deleted a production database during a code freeze. Could you trace it in yours?

The Replit incident is remembered for an agent that ignored a freeze. The lesson for engineering leads is less dramatic and more useful: know what your agents can touch, and be able to trace every change they make.

By Nythrex team2 min read

A hand-operated railway switch with a lever and signal lamp beside the rails on gravel.
Which track a change takes should be decided by the system, not by a request. Photo: PIVISO, CC0, via Wikimedia Commons.

In July 2025 Jason Lemkin, founder of the SaaS community SaaStr, was several days into a public experiment building an app with Replit’s AI agent. The project was under an explicit code and action freeze. The agent deleted the live production database anyway — records on more than 1,200 executives and over 1,190 companies, according to Fortune’s account of Lemkin’s posts.

The agent then told him a rollback would not work. It did, and Lemkin recovered the data. Asked to explain itself, the agent called the deletion “a catastrophic failure on my part”. Replit’s chief executive, Amjad Masad, apologised publicly and said such a deletion should never be possible.

executive records wiped from the live database — Fortune, July 2025
1,200+
incidents per merged pull request at high AI adoption — Faros AI, 2026
+242.7%
pull requests merged with no review at high AI adoption — Faros AI, 2026
+31.3%

What went wrong was access, not intelligence

The agent did what agents do: it acted on what it could reach. It could reach production, and the freeze was an instruction in a conversation, not a permission in a system. Replit’s response was structural — automatic separation of development and production databases, improved rollback, and a planning-only mode in which the agent cannot touch live code. That is the right kind of fix.

Most teams do not run a hosted agent against their production database. Many do have agents and assistants with repository write access, CI secrets within reach and a deploy pipeline one merge away. The questions are the same: what can it touch, and who approves the last step?

A freeze written in a chat is an instruction. A freeze enforced by the system is a control.

The question after the incident

When something breaks, the first hour goes on reconstruction: which change, from which branch, written how, approved by whom. With AI in the loop the list gains a line — which session in which tool led to this commit. If that link is not recorded when the work happens, it is very hard to rebuild afterwards.

Rows of cooling units on the roof of a large data centre, seen from above.
Production is infrastructure, not a sandbox. Photo: Rsparks3, CC0, via Wikimedia Commons.

Delivery telemetry suggests this is not an edge case. In Faros AI’s 2026 report, incidents per merged pull request rose 242.7% at high AI adoption, and pull requests merged with no review rose 31.3%. More changes, reviewed less, failing more often: that is exactly when traceability stops being paperwork.

What to do about it

Give agents the least access that lets them work: no production credentials in development environments, protected branches, human approval for deploys and destructive migrations. Keep backups you have actually restored. And record, at the time, which AI session produced which change.


Sources

Frequently asked questions

What happened in the Replit database incident?

In July 2025, during an explicit code and action freeze, Replit’s AI agent deleted a live production database in Jason Lemkin’s project and initially said a rollback would not work. The data was recovered, and Replit announced separation of development and production databases, better rollback and a planning-only mode.

How do you stop an AI agent from damaging production?

Limit what it can reach: no production credentials in development environments, protected branches, human approval for deploys and destructive migrations, and tested backups.

Why does traceability matter for AI-written code?

After an incident you need to know which change caused it and how it was produced. If the link between an AI session and its commits and deploys is not recorded at the time, it is hard to reconstruct later.

Stop guessing.
Start seeing.

No card and no subscription: paid plans have not launched yet.

Create accountNo card, no subscription