{"schema_version":"0.10.0","id":"LR-2026-0311","record_version":1,"title":"Claude Code ran terraform destroy on DataTalks.Club production, wiping database and snapshots","verification":{"human_verified":false,"method":"automated_gate","auto_verified":true,"score":47.2,"score_breakdown":{"source_authority":12.1,"independent_corroboration":7.0,"implicated_party_confirmed":0.0,"citation_integrity":14.0,"specificity":0.0,"completeness":6.72,"unhedged_language":5.0},"checks":{"schema_valid":true,"every_field_cited":true,"quotes_verbatim":true,"source_fetched":true,"distinct_incident":true,"dates_plausible":true,"sources_agree":true,"source_describes_incident":true,"severe_backed_by_source":true,"record_integrity":true,"eligible":true,"about_this_case":true},"gate_version":"gate-2026-10-18.7","cross_check_model":null,"cross_check_agreement":null,"duplicate_of":null,"verified_by":null,"verified_at":"2026-11-01","extraction_run_id":null,"evidence_level":{"level":"preliminary","reason":"1 report: Tom's Hardware · subject to change","original_document":null,"reports_total":1,"reports_independent":1,"reports_derivative":0,"developing":false,"disputed":false,"rules_version":"evidence-2026-10-29.1","computed_at":"2026-11-01","history":[{"date":"2026-11-01","from_level":null,"to_level":"preliminary","reason":"1 report: Tom's Hardware · subject to change"}]},"sources_hash":"cd59254cac2880470d9a83878669153344cecadc59c5da09a5147b91bd410793"},"system":{"model_name":null,"model_version":null,"developer":"unknown","harness":"Claude Code","tools_granted":["terraform"],"permissions_scope":"wide-ranging and not scoped for production","autonomy_level":"unknown","guardrails_present":[],"deployment_context":"production","tier":null,"lifecycle_stage":null,"integration_type":null,"intended_use":"Moving the AI Shipping Labs website to AWS on the same infrastructure as DataTalks.Club","safeguard_state":null,"production_intended":null},"event":{"date_occurred":null,"date_disclosed":"2026-03-07","incident_class":"operational_error","failure_class":null,"agent_involved":true,"secondary_failure_classes":[],"trigger":"unknown","duration":null,"detection_method":"unknown","summary":"An operator using Claude Code, working on Terraform to move a website to AWS, had the agent run infrastructure commands. After the operator uploaded a state file describing the full setup, Claude Code issued a Terraform destroy operation, and the wipe removed the setup for both the DataTalks.Club and AI Shipping Labs sites, including a database with 2.5 years of records and snapshots the operator had counted on as backups. The operator contacted Amazon Business support, which helped restore the data within about a day. In a post-mortem the operator said he had over-relied on the agent and would stop it running Terraform, set delete protections, move the state file to S3, and review plans manually.","tags":["terraform"],"date_detected":null,"near_miss":null,"root_cause":"oversight","root_cause_detail":"Improper supervision of the agent, as attributed in the press account","failure_class_detail":null,"responsible_party":null,"adversarial_actor":null,"input_provenance":null,"time_to_contain":null,"operations_paused":null,"remediation":null,"precursor_events":null,"primary_risk":"RK02","secondary_risks":["RK03"],"control_chain":[{"layer":"L3","party":"deployer","party_name":"Alexey Grigorev","control_id":"B1","outcome":"missing","reason":null,"quote":"He also admitted he \"over-relied on the AI agent to run Terraform commands\", and is now stopping the agent from doing so, and will manually review every plan Claude presents so he can run any destructive actions himself.","source_index":0,"reviewed":false}]},"impact":{"direct_loss_usd":null,"remediation_hours":null,"records_exposed":null,"third_parties_affected_count":null,"severity":"minor","severity_because":"Minor test: loss contained to one operator's setup for both sites; the source states no third party touched","harm_class":["operational"],"affected_description":"Setup for both the DataTalks.Club and AI Shipping Labs sites, including a database with 2.5 years of records and database snapshots","protected_class_involved":null,"data_categories_exposed":[],"loss_range_usd":null,"reversibility":"reversible","downstream_exposure_count":null},"evidence":{"sources":[{"url":"https://www.tomshardware.com/tech-industry/artificial-intelligence/claude-code-deletes-developers-production-setup-including-its-database-and-snapshots-2-5-years-of-records-were-nuked-in-an-instant","publisher":"Tom's Hardware","date":"2026-03-07","type":"press","title":"Claude Code deletes developers' production setup, including its database and snapshots — 2.5 years of records were nuked in an instant","archived_url":null,"attachment":"first_report","independence":"independent"}],"per_field_confidence":{"system.harness":"C","system.tools_granted":"C","system.intended_use":"C","system.deployment_context":"C","system.permissions_scope":"C","event.agent_involved":"C","event.root_cause":"C","event.root_cause_detail":"C","event.tags":"C","impact.affected_description":"C","impact.harm_class":"C","impact.reversibility":"C","event.incident_class":"D","impact.severity":"D","impact.severity_because":"D","event.primary_risk":"D","event.secondary_risks":"D","event.control_chain":"C","event.summary":"C","system.autonomy_level":"D","event.trigger":"D","event.detection_method":"D","context.country":"D","system.developer":"D","event.date_disclosed":"D","context.denominator_available":"D"},"field_citations":{"system.harness":[{"source_index":0,"quote":"Sometimes, though, the errors can be attributed to improper supervision, as was the case of Alexey Grigorev, who was brave enough to detail how he got Claude Code to wipe years' worth of records on a website, including the recovery snapshots."}],"system.tools_granted":[{"source_index":0,"quote":"He had Claude run a Terraform plan to set up the new website, but forgot to upload a vital state file that contains a full description of the setup as it exists at any moment in time."}],"system.intended_use":[{"source_index":0,"quote":"The story begins when Grigorev wanted to move his website, AI Shipping Labs, to AWS and have it share the same infrastructure as DataTalks.Club."}],"system.deployment_context":[{"source_index":0,"quote":"It's tempting to mark this story as another one of \"dumb bot gone wrong,\" but it's a fair guess that most sysadmins will spot the baseline issues with Grigorev's approach, including granting wide-ranging permissions to what's effectively a subordinate of his, as well as not scoping permissions in a production environment to begin with."}],"system.permissions_scope":[{"source_index":0,"quote":"It's tempting to mark this story as another one of \"dumb bot gone wrong,\" but it's a fair guess that most sysadmins will spot the baseline issues with Grigorev's approach, including granting wide-ranging permissions to what's effectively a subordinate of his, as well as not scoping permissions in a production environment to begin with."}],"event.agent_involved":[{"source_index":0,"quote":"As Claude now had the state file, it logically followed it, issuing a Terraform \"destroy\" operation in preparation to set up things correctly this time."}],"event.root_cause":[{"source_index":0,"quote":"Sometimes, though, the errors can be attributed to improper supervision, as was the case of Alexey Grigorev, who was brave enough to detail how he got Claude Code to wipe years' worth of records on a website, including the recovery snapshots."}],"event.root_cause_detail":[{"source_index":0,"quote":"Sometimes, though, the errors can be attributed to improper supervision, as was the case of Alexey Grigorev, who was brave enough to detail how he got Claude Code to wipe years' worth of records on a website, including the recovery snapshots."}],"event.tags":[{"source_index":0,"quote":"Gregory uses Terraform, an infrastructure management utility that can create (or destroy) entire setups, including networks, load balancing, databases, and, naturally, the servers themselves."}],"impact.affected_description":[{"source_index":0,"quote":"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."}],"impact.harm_class":[{"source_index":0,"quote":"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."}],"impact.reversibility":[{"source_index":0,"quote":"The operator had to contact Amazon Business support, which helped restore the data within about a day."}],"event.incident_class":[{"source_index":0,"quote":"Sometimes, though, the errors can be attributed to improper supervision, as was the case of Alexey Grigorev, who was brave enough to detail how he got Claude Code to wipe years' worth of records on a website, including the recovery snapshots."}],"impact.severity":[{"source_index":0,"quote":"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."}],"impact.severity_because":[{"source_index":0,"quote":"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."}],"event.control_chain":[{"source_index":0,"quote":"He also admitted he \"over-relied on the AI agent to run Terraform commands\", and is now stopping the agent from doing so, and will manually review every plan Claude presents so he can run any destructive actions himself."}],"event.summary":[{"source_index":0,"quote":"Sometimes, though, the errors can be attributed to improper supervision, as was the case of Alexey Grigorev, who was brave enough to detail how he got Claude Code to wipe years' worth of records on a website, including the recovery snapshots."},{"source_index":0,"quote":"As Claude now had the state file, it logically followed it, issuing a Terraform \"destroy\" operation in preparation to set up things correctly this time."},{"source_index":0,"quote":"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."},{"source_index":0,"quote":"The operator had to contact Amazon Business support, which helped restore the data within about a day."},{"source_index":0,"quote":"He also admitted he \"over-relied on the AI agent to run Terraform commands\", and is now stopping the agent from doing so, and will manually review every plan Claude presents so he can run any destructive actions himself."}]},"notes_on_gaps":"Only one press source (Tom's Hardware) is given; it reports the operator's post-mortem second-hand. Not stated: model name, model version, developer, autonomy level, guardrails, date of occurrence, date of disclosure, date of detection, detection method, containment time, adversarial actor, country and industry. The restore took 'about a day', which is not converted to a duration. The 'Claude advised against' point is not treated as a control. Judgements made: root cause set to oversight from the press's 'improper supervision' wording; responsible party set to deployer; severity set to minor because the source describes one operator's setup and states no third party touched, though the DataTalks.Club records' ownership is not stated; reversibility set to reversible because data was restored. Failure class left out because the sources do not describe a failure mode beyond destructive execution. Trigger left out because the cause is not stated as a trigger category. Control A1 is marked failed from the press's statement about unscoped permissions; B1 is marked missing from the operator's admission of over-reliance. [case created by the backfill: read by claude-haiku-5-5, backfill-2026-11-01.2, 2026-11-01; not yet reviewed] [2026-11-01: evidence level set: Preliminary (1 report: Tom's Hardware · subject to change)]"},"context":{"industry":null,"org_size_band":null,"country":"unknown","denominator_available":false,"denominator":null,"related_incident_ids":[],"systemic_exposure":null,"shared_model_id":null,"upstream_incident_id":null,"incident_evidence":null,"regulatory":null,"coverage":null},"narrative":{"steps":[{"step":"went_wrong","text":"After the state file was uploaded, the agent issued a Terraform destroy operation.","quote":"As Claude now had the state file, it logically followed it, issuing a Terraform \"destroy\" operation in preparation to set up things correctly this time.","source_index":0,"grade":"C"},{"step":"reached","text":"The destroy wiped the setup for both sites, including the database and snapshots.","quote":"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.","source_index":0,"grade":"C"},{"step":"done","text":"Amazon Business support helped restore the data within about a day.","quote":"The operator had to contact Amazon Business support, which helped restore the data within about a day.","source_index":0,"grade":"C"}],"model":"claude-haiku-5-5","prompt_version":"backfill-2026-11-01.2","extracted_at":"2026-11-01","source_urls":["https://www.tomshardware.com/tech-industry/artificial-intelligence/claude-code-deletes-developers-production-setup-including-its-database-and-snapshots-2-5-years-of-records-were-nuked-in-an-instant"]},"analysis":{"sections":{"timeline":[{"text":"Claude advised against sharing infrastructure between the two sites; the operator proceeded anyway.","quote":"Claude itself advised against that option, but Grigorev considered it wasn't worth the hassle or cost of keeping two separate setups.","source_index":0,"when":null},{"text":"Claude ran a Terraform plan without the state file uploaded.","quote":"He had Claude run a Terraform plan to set up the new website, but forgot to upload a vital state file that contains a full description of the setup as it exists at any moment in time.","source_index":0,"when":null},{"text":"Claude created part of the new setup; the operator stopped it halfway.","quote":"Claude did what Gregory wanted and created a setup for the Shipping Labs site, however, the operator stopped it halfway.","source_index":0,"when":null},{"text":"Duplicate resources were identified and the state file was uploaded.","quote":"Gregory had Claude identify the duplicate resources to correct the situation, then uploaded the state file, believing he had the situation sussed out.","source_index":0,"when":null},{"text":"Claude issued a Terraform destroy operation.","quote":"As Claude now had the state file, it logically followed it, issuing a Terraform \"destroy\" operation in preparation to set up things correctly this time.","source_index":0,"when":null},{"text":"The destroy wiped both sites, including the database and snapshots.","quote":"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.","source_index":0,"when":null},{"text":"The operator contacted Amazon Business support, which helped restore the data within about a day.","quote":"The operator had to contact Amazon Business support, which helped restore the data within about a day.","source_index":0,"when":null},{"text":"In the post-mortem the operator described remediation measures.","quote":"In the post-mortem, Gregory describes a few measures he's taking to avoid similar incidents in the future, including setting up a period test for database restoring, applying delete protections to Terraform and AWS permissions, and moving the Terraform state file to S3 storage instead of his local machine.","source_index":0,"when":null}]},"model":"claude-haiku-5-5","prompt_version":"backfill-2026-11-01.2","extracted_at":"2026-11-01","source_urls":["https://www.tomshardware.com/tech-industry/artificial-intelligence/claude-code-deletes-developers-production-setup-including-its-database-and-snapshots-2-5-years-of-records-were-nuked-in-an-instant"]}}