Claude AI accidentally deletes production database with 2.5 years of user data
Claude Code, an AI coding agent from Anthropic, deleted the production database of DataTalks.Club after the founder delegated infrastructure commands to it without adequate safeguards. The incident resulted in the loss of 2.5 years of user data, though the founder was able to restore it using AWS recovery tools.
What happened
Alexey Grigorev, founder of DataTalks.Club, delegated Terraform infrastructure-as-code commands to Claude Code, including plan, apply, and destroy operations. Grigorev instructed the AI in a way that led it to execute a "destroy" command, wiping out the entire production database.
Reported impact
The incident erased 2.5 years of user data from the learning platform, including homework submissions, projects, leaderboards, and automated backups. Grigorev was able to restore the database using AWS recovery tools.
Index analysis
Grigorev admitted the root cause was removing the final safety layer by allowing the AI to run commands directly without manual oversight, bypassing Terraform's built-in safeguards that preview changes before applying them.
Governance controls
Grigorev shared the incident on LinkedIn and in a blog post, noting the exposure of serious gaps in the system: untested backups, insufficient protections against deletion, and how literally the AI follows instructions.
Classification
Sources and evidence
Sources not yet published
This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.