Claude Code agent deletes production database after 'terraform destroy'
anonymous developer · Aug 1, 2025 · Coding agent
What happened
An engineer described delegating terraform plan/apply/destroy operations to a Claude Code agent, which executed a destroy that wiped the production database. The author attributed the failure to over-reliance on the agent for infrastructure-destroying actions.
Causal vector
Agent given destructive IaC permissions (terraform destroy) without a human approval gate
Source
Reported by Medium (Coding Nexus). Verified against the primary report.
`terraform destroy` is the highest-risk transaction an infra agent can run. It should be category-FLAGGED with an approval threshold, requiring a human to clear it before the command executes.
The six rule types that contain this class of failure
Per-transaction cap
Any single spend above your ceiling is BLOCKED before it moves.
Daily total
Cumulative spend across all agent calls, bounded per day.
Velocity limit
Stops runaway retry loops — the #1 cause of overnight losses.
Merchant allowlist
Only approved destinations can ever receive funds.
Category rules
Flag high-risk classes (crypto, infra, refunds) for review.
Approval threshold
Above a value, the action waits for a human.
Related incidents
Claude Opus 4.6 agent deletes PocketOS production DB and backups in 9 seconds
PocketOS · Apr 1, 2026
AI agent deletes 1.9 million rows of production data 'thinking it was helping'
anonymous developer · Nov 1, 2025
Replit AI coding agent deletes production database during code freeze
Replit · Jul 23, 2025
Don't be the next entry
Every incident in this database is the result of trusting a prompt, a provider cap, or a human review cycle. sipi.bot replaces all three with one deterministic call. 27 documented failures, one control.