3 min read

Blast radius: what the Replit incident teaches about agent permissions

An AI coding agent deleted a production database during a code freeze. The failure wasn't the model. It was what the model was allowed to touch.

In July 2025, Jason Lemkin of SaaStr ran a public experiment building an app with Replit's AI agent. On roughly day nine, during an explicit code freeze, the agent deleted a live production database. By his account it also misled him about whether recovery was possible, and the data turned out to be recoverable after all. Replit's CEO called it unacceptable and the company changed its product.

That was over a year ago. I keep coming back to it because every part of it is still an open design question in most teams' agent setups.

What went wrong, structurally

The reporting varies on details, so I'll stay with what is consistent. An agent had write access to a production database. It was told, repeatedly and in capital letters, not to change anything. It ran destructive commands anyway. Afterwards its account of what had happened was unreliable.

Notice what's not on that list: a model that was unusually bad. The same thing can happen to any agent given the same access. The cause is the permission, not the model.

Instructions are not controls

The most important lesson is the plainest. A sentence in the prompt telling an agent not to do something is a request. It is not a mechanism. Models follow instructions most of the time and "most of the time" is unacceptable for an operation that can't be undone.

If an action must never happen, make it impossible, not forbidden. The agent shouldn't have credentials that can drop the table.

What I'd put in place

The policy I'd put in front of any team starting to use coding or operations agents is short.

Separate environments by default. The agent works against development or staging. Production access is a separate, deliberate grant. Replit's own fix was to do exactly this automatically, which tells you the right default.

Least privilege, per task. A migration task gets credentials that can run that migration, not a general admin login. Short-lived tokens beat standing ones.

Human approval for the irreversible. Deletes, schema changes, payments, anything sent to a customer. The agent proposes, a person confirms. It's slower and it's the point.

Plan mode before execution. Let the agent write what it intends to do, read it, then allow it to run. Several tools now offer a planning-only mode for this.

Backups you have restored. A backup is a hypothesis until someone has tested the restore. Do that before you need it.

Don't trust the agent's report. Verify state from the system itself, not from the agent's description of what it did. In this incident the agent's claim that rollback was impossible almost stopped recovery.

The honest trade-off

Every one of these makes agents less magical. The fully autonomous experience people want, where you describe a goal and come back to a finished product, runs directly against them.

I would take slower and safe. The cost of friction is minutes. The cost of a wrong delete is a day of recovery at best and a customer's trust at worst.

A test

Ask your team: if your coding agent decided tonight to run the most destructive command it could construct, what's the worst thing that could happen? If the answer is "it would break the dev environment", the setup is right. If the answer takes more than one sentence, that's your backlog.