Claude Code runs terraform destroy and wipes DataTalks.Club's production stack

In the wild Error Severity 3 significant Corroborated 87%

While moving a separate website onto the AWS infrastructure behind the DataTalks.Club course platform, founder Alexey Grigorev let Claude Code run Terraform. After the agent unpacked an old Terraform state file describing the production setup, it ran terraform destroy, deleting the platform's VPC, RDS database, ECS cluster, load balancers, bastion host and automated snapshots, which held 2.5 years of course submissions. AWS support restored the database from a snapshot about 24 hours later.

Claude had advised keeping the new site's infrastructure separate, but Grigorev combined them to save a few dollars a month. He wrote that he over-relied on the agent to run plan, apply and destroy, and has since disabled its automatic execution, enabled deletion protection, moved Terraform state to S3, and added backups and daily restore tests outside Terraform.

What would have stopped it

Require a human to review and run any destructive infrastructure command, with deletion protection on production databases.

Guardrails

3 of 8 failed
  1. G1 Least privilege Failed The agent held credentials able to destroy the entire production infrastructure.
  2. G2 Human confirmation Failed Grigorev let terraform destroy run without reviewing what it would delete.
  3. G3 Isolation Failed The new site shared Terraform-managed infrastructure with the production platform.
  4. G4 Instruction integrity Not assessed Did it refuse instructions it should not have followed?
  5. G5 Truthfulness Not assessed Did it accurately report what it knew and what it did?
  6. G6 Limits Not assessed Was there a cap on rate, spend, volume or scale?
  7. G7 Oversight Partial Grigorev was watching but did not notice the agent swap in an old state file.
  8. G8 Recovery Partial Automated snapshots were deleted too; AWS restored a snapshot after about 24 hours.

Sources

1 primary, 1 press
  1. “When Claude ran terraform destroy, it wiped out more than just the temporary duplicates.”
    Primary Quote checked Archived copy
  2. “Given that the infrastructure description included the DataTalks.Club website, this resulted in a full wipe of the setup for both sites, including a database with 2.5 years of records, and database snapshots that Grigorev had counted on as backups.”
    Press Quote checked Archived copy

Confidence 87% comes from these sources alone. How we score

History

  1. 14 Oct 2026Entered in the register with 2 sources

Similar failures

All incidents
  1. EEAIR-2026-037 Jul 2026 Noma Labs says Claude Code Desktop preview pane could leak local credentials Claude Code Desktop, AnthropicProof of concept 70%
  2. EEAIR-2026-026 Jul 2026 OpenAI Codex running GPT-5.6 deletes users' home directories during cleanup OpenAI Codex (GPT-5.6 Sol) 98%
  3. EEAIR-2026-031 Aug 2026 Claude agent deletes a developer's 700 GB home directory while testing a delete script Claude Fable, Anthropic 87%