← All blog posts
POST-MORTEM · INFRASTRUCTURE

9 seconds: what the PocketOS and DataTalks.Club incidents teach about AI and production.

Two AI coding sessions, two production databases gone. The same three mistakes sat under both — and none of them was the model.

In April 2026 a coding session at PocketOS deleted the company’s production database in 9 seconds. Seven weeks earlier, the founder of DataTalks.Club published the post-mortem of a session that ran terraform destroy against his production stack. Both stories were read as “the AI went rogue.” Read the details and a different picture comes out: in both cases the AI did something a careless human could have done with the same access, and the same three gaps turned a mistake into an outage.

PocketOS: one API call, 9 seconds

According to founder Jer Crane’s account, relayed by Computing and heise:

DataTalks.Club: the wrong state file

From Alexey Grigorev’s own post-mortem:

In both cases the model did what the credentials allowed. The credentials allowed everything.

The three gaps they shared

1. The session held keys to production

A token that can delete any volume in the account. AWS credentials and a state file that can destroy the whole stack. Neither session needed that power for the task it was doing. Whatever a session can reach, a single wrong guess can destroy.

2. The backups lived inside the blast radius

Backups on the same volume as the data. Snapshots managed by the same Terraform that deleted the database. A backup the same command can delete is a copy, not a backup.

3. Nobody saw it while it happened

Nine seconds is faster than any human review. What decides the size of the damage is what happens in the next nine minutes: who knows, and whether they know exactly what ran.

The checklist

  1. Scope every token to the task. Project- or environment-scoped tokens instead of account-wide ones; read-only where reading is all that’s needed. No production credentials on a machine where an AI session runs unattended.
  2. Turn on delete protection. deletion_protection on managed databases, lifecycle { prevent_destroy = true } on the Terraform resources that hold data, and the equivalent on your host.
  3. Move backups out of reach. Another account, another bucket, a lifecycle the same tool can’t touch — and restore one on a schedule, so you know it works.
  4. Keep the prompt on for infrastructure commands. In Claude Code, an ask rule makes it stop and ask before any Terraform destroy, even if you allow most other commands:
    {
      "permissions": {
        "ask": ["Bash(terraform destroy:*)", "Bash(terraform apply:*)", "Bash(railway:*)"]
      }
    }
  5. Keep state remote and locked. A state file on a laptop is a state file that can be stale.
  6. Make sure someone sees destructive commands the moment they run. Not in tomorrow’s logs.

Where ArgosBrain fits — and where it doesn’t

ArgosBrain can’t bring back a deleted volume, and it doesn’t replace any item on the list above. It covers the last one and part of the first.

ArgosBrain Supervisor alarm on a demo project: Codex on a build server removed the test and review steps from a deploy pipeline, shown line by line
A Supervisor alarm on an invented demo project, with the change behind it.

The alarm fires when the command runs; it does not stop it. The permission prompt, scoped tokens and delete protection are what stop it. ArgosBrain makes sure the person who can act finds out first.

Sources

Computing, AI coding agent goes rogue, deletes company database in nine seconds
heise, AI agent deletes data: catastrophe for PocketOS
Alexey Grigorev, How I Dropped Our Production Database and Now Pay 10% More for AWS (March 6, 2026)