Agent Horror Stories

Viewer discretion advised · Updated nightly

← Back to the feed
data loss·linkedin·

Claude Code Nuked 2.5 Years of Production Data—But It Wasn't Even Wrong

A developer asked Claude Code to clean up duplicate Terraform resources. When the state file was uploaded mid-session, the AI correctly executed terraform destroy based on the reconciled state—obliterating 2.5 years of database records and snapshots in seconds.

Horrifying

A staff engineer at a tech company turned to Claude Code for a routine task: removing duplicate Terraform resources. The initial state file was missing, so Claude created duplicates in working memory. Reasonable enough. Then the developer uploaded the actual state file, expecting the AI to resume cleanup.

Here's where intent met infrastructure logic. Terraform doesn't 'clean up'—it reconciles. When Claude processed the uploaded state file, it saw a mismatch: the production environment had 2.5 years of database records and snapshots; the state file had none. Claude did what Terraform is supposed to do. It issued terraform destroy. Gone. Instantly.

AWS support later recovered an internal snapshot, but the lesson burned bright: the AI made no logical error. It executed the tool chain correctly. The real catastrophe was architectural—a single command in the wrong hands (human or silicon) could vaporize an entire environment. The developer's guardrail failure, not Claude's, lit the fuse.

Source: www.linkedin.com · by Vitalii Shturmin

More nightmares like this