Skip to content
Menu
Patent pending

A Consequence Record · The Consequence Library

DataTalks.Club: production deletion following use of stale infrastructure state

A destructive infrastructure command was approved and executed using an outdated state file that represented a broader environment than intended.

The Consequence Library · How records are made and graded

A Claude Code agent running with auto-approve executed terraform destroy against DataTalks.Club's full production stack, deleting the database, including roughly 1.94 million rows of student coursework, and all automated snapshots, erasing 2.5 years of student data until AWS restored it from an internal snapshot about 24 hours later.

Date
26 February 2026
Sector
dev-tools-saas
System type
coding-cyber-agent
Failure stage
tool-call
Consequence
operational-disruption
Severity
S3, significant
Confidence
Event: C2, multi-source corroborated
AI attribution: C2, multi-source corroborated
Last verified
16 August 2026

Evidence caveat. The agent advised against the consolidation and was overridden by the operator before the destroy occurred. That fact is part of the record and is why this is coded as stale authority rather than an agent acting against instruction.

What happened

On 26 February 2026 founder Alexey Grigorev asked the agent to help clean up duplicate cloud resources; he was missing his current Terraform state file after switching laptops. Per his detailed postmortem, corroborated by Tom's Hardware and catalogued as AI Incident Database #1424, the agent unpacked an archived, stale state file describing the entire production stack and reasoned that destroying the resources through Terraform would be cleaner. With auto-approve enabled it ran terraform destroy. The VPC, RDS database, ECS cluster, load balancers, bastion host and all automated snapshots were destroyed in seconds. Because the snapshots were managed within the same infrastructure-as-code lifecycle, no customer-visible backup survived; recovery required AWS Business Support restoring from an internal snapshot not visible in the customer console, about 24 hours later. Grigorev records that the agent had earlier advised the safer architecture and had been overridden. In June 2026 Anthropic shipped a Claude Code release with hard blocks on terraform destroy and comparable destructive commands in auto mode, roughly four months after the consequence.

Where control failed

Three layers. Stale authority and stale state, where an archived state file silently re-scoped the agent's view from duplicates to everything. No hard block on destructive infrastructure-as-code commands in auto-approve mode. And backups coupled to the lifecycle of the thing they backed up, so one command deleted the system and its recovery path together.

The authority question

The operator approved the cleanup and had enabled automated execution. The agent had previously recommended a safer infrastructure arrangement. The control question is whether the destructive action was approved with a verified understanding of the scope represented by the stale state file.

What could be proven afterward

The founder's postmortem is unusually transparent, the Terraform and AWS action trail is inherently logged, and independent outlets corroborated the sequence, so evidence quality here is high. The notable evidentiary fact is on the recovery side: the data's survival depended on an internal snapshot the customer could not see, enumerate, or verify existed.

Control state, before and after

Before the consequence

Auto-approve enabled on destructive infrastructure commands. Archived state file reachable and trusted. Snapshots inside the same lifecycle as the resources.

After the consequence

Vendor shipped hard blocks on terraform destroy and comparable commands in auto mode, roughly four months later.

Sources

Record history

Published 16 August 2026. Load-bearing facts re-verified against the cited sources on 16 August 2026. Corrections and material changes are appended here with their dates. To report an error in this record, write to hello@regulayer.com with the record slug and the source you believe is authoritative.

This record describes what sources establish about a consequence and the control state around it. It separates confirmed fact from source-stated cause and from architectural analysis, and it makes no claim that any control or product would have prevented the outcome. Gap codes identify a failure class, not a remedy.