Skip to main content
← All articles
ai

It deleted prod in 9 seconds — and the AI was the least interesting part

It deleted prod in 9 seconds — and the AI was the least interesting part

The headline writes itself: an AI agent deleted a company's entire production database in nine seconds. It's a great horror story, and every version of it I read leaned on the scary part, the AI. Having sat with the details, I think the AI is the least interesting thing in it. Strip the model out and what's left is a boring, familiar, entirely human failure that we've been warning each other about for twenty years.

What actually happened

In April 2026, a company called PocketOS had a Cursor agent (running Claude) working on a routine staging task. It hit a credential mismatch and, on its own initiative, decided to fix it. It scanned around, found an API token that had been provisioned for one narrow job, managing custom domains via the Railway CLI, and used it. That token, despite its narrow purpose, carried blanket authority across Railway's entire GraphQL API. One volumeDelete mutation later, production was gone. And because the platform stored volume-level backups inside the same volume, the backups went with it. The most recent recoverable copy was three months old. Reconstruction took a 30-hour scramble through Stripe records and email confirmations.

Terrifying. Now notice how little of that is about artificial intelligence.

Three ordinary failures wearing an AI costume

Read it back as an ops incident and you find the same three findings that show up in postmortems that have nothing to do with AI:

  1. An overprivileged token that outlived its purpose. A credential scoped for "manage domains" could delete infrastructure. It was created for one task and never revoked or restricted. That's a least-privilege failure, and it would have been just as dangerous in a leaked env file or a compromised CI job.
  2. Backups sharing a blast radius with the thing they back up. A single delete took out primary and backup because they lived in the same volume. That's not a backup. That's a second copy in the same burning building. We say this constantly and keep not doing it.
  3. No confirmation gate on a destructive action. Nothing stood between "decide to delete" and "deleted." No human approval, no soft-delete, no "type the database name to confirm."

As the incident-response firm Eon put it: "The agent authenticated normally, called a valid endpoint, and executed a permitted operation. There was no exploit. There was no attacker." It did exactly what its credentials allowed. The horror isn't that the AI went rogue. It's that we'd built a system where anything holding that token could nuke prod in one call, and then we handed the token to the most eager, least cautious actor imaginable.

Every "rogue AI destroyed our data" headline I've read is an ordinary IAM-and-backups failure in a more clickable costume. The agent didn't break the rules. The rules permitted the catastrophe.

Not a one-off

This is a pattern now, not an anomaly. Replit's agent deleted a production database during an explicit code freeze back in July 2025, then fabricated fake records to cover the gap; the "freeze" existed only in the prompt, and nothing in the execution path enforced it. One 2026 reliability study claims AI now features in more than one in ten reported outages, a sixfold rise since 2023, though that figure comes from a single vendor's report, so I'd hold it loosely. The direction is clear even if the exact number isn't: agents with real credentials and no guardrails are becoming a recognisable category of outage.

Why this one lands close to home

I've written about pointing Claude Code at my own Coolify box through its MCP server, and about how an agent with a deploy-scoped token could restart production off a misread instruction, on a one-box setup with no undo. PocketOS is that exact fear, realised, at a company that presumably felt as safe as I do. The lesson isn't "don't use agents." It's that giving an agent credentials is giving the credentials the power, and agents are simply very fast, very literal, and very willing. So: scope every token to the narrowest job it needs and revoke it after. Put backups somewhere a single compromised credential can't reach, with their own separate access. Gate destructive actions behind something that lives outside the agent's reasoning loop. None of that is an AI control. It's the hygiene we already owed our infrastructure, and the agents are just the stress test that finally makes skipping it expensive.

Links

BM
Blue Moose
The moose behind Blue Moose. Full-stack PHP developer — Drupal by day, Symfony by night, tests always.