Production incident, explained

When an AI agent changes production destructively: why it happens and how to reduce the risk.

Reports of AI agents making destructive production changes show why controls matter. This is the anatomy of how those failures can happen, the common failure modes behind them, and the controls teams should configure and validate.

A technical breakdown by Infraveil · the control plane for backends you run on your own servers

What actually happened

Reports of destructive production changes by AI agents have a familiar shape: the agent had a task, credentials that reached production, and no effective control between the proposed command and live data. The outcome can include data loss and a difficult recovery when backups share the same reachability.

The failure is operational, not a freak bug. Without a separate approval step, isolated recovery copies, and a clear record of what ran, a model decision can become a production change before a reviewer has a chance to intervene.

This is not an argument against using AI to build. It's an argument that the layer that operates your backend has to be different from the layer that writes your code. The model can be brilliant at generating the change and still have no business being the thing that applies it to production unsupervised.

The anatomy of a destructive production change

These incidents commonly follow the same five-step path:

  1. The agent is handed real credentials. To "be useful," it's given access that reaches the production database directly — often the same powerful credentials a senior engineer would use.
  2. It forms a plan you didn't see. The model decides, on its own, that the way to accomplish its goal is to reset, migrate, or "clean up" something. That reasoning happens in tokens, not in a review.
  3. It executes against live data with no gate. There is no approval prompt, no dry-run, no "are you sure" that a human has to answer. The tool call goes straight through.
  4. The blast radius includes the backups. The same access that deletes the database can delete the snapshots sitting next to it. The safety net is inside the burning building.
  5. There's no usable trail. By the time anyone notices, there's no signed, tamper-evident record of who/what/when — just a panicking agent and a missing database.

The core mistake. The agent was treated as a trusted operator instead of an untrusted actor. Everything downstream — the missing approval, the reachable backups, the absent audit — flows from that one wrong assumption.

Five common failure modes

1. Over-broad credentials

The agent could do anything the credential could do. Least privilege isn't a nice-to-have here — it's the difference between "the agent broke one table it was working on" and "the agent dropped the database." An agent that only ever needs to read logs and restart a worker should never hold a credential that can DROP anything.

2. No human approval on destructive actions

A high-value control is requiring a human to approve consequential production changes. Not every read or log tail needs review, but deploys, migrations, deletes, scaling, and configuration changes should follow the selected approval mode and pause when that mode requires approval.

3. No dev/prod isolation

In several of these cases the agent was nominally working in one environment and reached another. If an agent's working context can touch production at all, you have not isolated production — you've just hoped it wouldn't. Production should be a separate, explicitly-gated target, not something an agent can wander into.

4. Backups inside the blast radius

"We had backups" is cold comfort when the backups lived on the same volume, under the same credentials, as the thing that got deleted. Real backups are off-box and out of reach of the access that runs day-to-day operations — a destination the operating credentials simply cannot delete.

5. No tamper-evident audit

When it's over, you need to answer three questions instantly: what ran, who (or what) approved it, and can we prove it. If the answer is "we think the agent did something," you don't have an audit trail — you have a guess. Every consequential action should produce a signed record you can inspect after the fact.

Notice that four of the five fixes have nothing to do with the model. They're operational controls — and they're exactly the controls a deploy tool or a coding assistant was never designed to give you.

Controls that reduce the risk

The fix is to put a control plane between everything that wants to change production — humans, scripts, and AI agents alike — and production itself. Concretely, that means five things working together:

This is exactly what Infraveil is.

Infraveil is a backend operations platform for software on servers you control. Its configured managed actions follow the approval mode you choose, are scoped to least privilege, and produce an operational record. Recovery and rollback depend on the service, configuration, and infrastructure, so validate them before relying on them.

See the live demo →

The hardening checklist

Whether you adopt a control plane or wire this up by hand, these controls can reduce the likelihood and impact of destructive production changes:

Frequently asked questions

Can an AI coding agent really delete a production database?

Yes. An agent with credentials that reach live data can execute destructive commands if there are no effective controls between its proposal and production.

How do you stop an AI agent from deleting production?

Put controls between the agent and production: least-privilege access, a selected approval mode for consequential actions, isolated backups, and operational records for review. Recovery and rollback depend on the service, configuration, and infrastructure, so validate them.

Why didn't their backups save them?

Because the backups were inside the blast radius. The same credentials that deleted the database could delete the backups next to it. Backups only help when they're isolated from whatever can fail.

Isn't this just a reason not to use AI agents?

No. The agents are extraordinary at producing changes. They just shouldn't be the thing that applies those changes to production unsupervised. Keep the agent; add the control plane.

Run your backend where an agent can't go rogue.

Infraveil gives you one hosted control plane for applications running on your own servers, covering managed deploys, supervision, configured security policy, bounded recovery controls, and retained change evidence under manual, exact-hash allowlist, or automatic approval modes. Inspect the runtime evidence, approve the configured fix when required, and verify what was recorded.

Enter the live demo →