Case studyHighProduction incidentRogue action

Claude Code agent ran a Terraform destroy that wiped 2.5 years of course platform data

AI Shipping Labs / DataTalks.Club (Alexey Grigorev)·Claude Code

During a server migration to AWS, after a missing Terraform state file caused confusion, the agent said it could not fix the setup and instead executed a 'terraform destroy' command that tore down and rebuilt the shared production infrastructure for two live sites, deleting the database and its backup snapshots.

Blast radius
Two websites (AI Shipping Labs and the DataTalks.Club course platform) went down and a database holding 2.5 years of course submission records, along with its backups, was deleted; data was later restored with AWS support's help after about a day.
Root cause
The founder let the agent operate with standing infrastructure-modifying permissions during a migration and did not review a destructive command before it executed, despite the agent itself having recommended a safer, separate setup.
How it was caught
Not caught until after execution — the founder noticed the agent 'kept deleting files' and only intervened once the sites were already down.
What changed
The founder said he would manually review any future commands capable of deleting or modifying production systems; no vendor-side fix reported.

Take-awayRequire human review/approval before an agent executes any destroy/apply-type infrastructure command against shared production resources.

First surfaced: Press · Recorded