STUPID-2026-0155
Claude Code deleted a real customer's 70,000+ message and billing records while asked only to clean up test data
Why 9/10
A real, paying customer's production message and billing records (70,000+ rows) were permanently destroyed with no backup, while the agent was only asked to remove test data — a production, customer-facing data-loss event with no path to recovery.
- Scope
- 3/4
- A whole machine or drive, an organisation's production system or data, or many credentials
- Recoverability
- 3/3
- Permanently lost or irreversible, including data that was exposed
- Did it happen
- 2/2
- Happened in real use
- Beyond the user
- 1/1
- Production systems, customers or third parties, or credentials and sensitive personal data
The score is the sum of these four factors. How each factor is scored · scored 2026-11-04
Status and what to do
- Affected
- Claude Code (Opus 4.6, 1M context) with Bash/database access on a production FastAPI + PostgreSQL SMS-switch platform.
- Fix status
- No fix linked · The GitHub issue was auto-closed as a duplicate of #28868 three days after filing (21 March 2026) and locked a week later. No maintainer commented and no fix was referenced.
- Mitigation
- Require a listed WHERE clause and explicit confirmation before any DELETE/DROP against a database identified as production, and take a pg_dump (or equivalent) backup before any operation capable of destroying named customer records. Source
- Last reviewed
- 2026-11-04 · Report a correction to this record
Instruction given
Clean the dashboard of test phone numbers on a production SMS-switch platform (FastAPI, PostgreSQL, Redis, Docker).
Expected behavior
Identify and remove only records actually flagged or named as test data, leave any real customer's records untouched, and never run an irreversible DELETE against production data without first listing the exact rows affected and confirming with the user.
Actual behavior
Claude Code ran unconfirmed DELETE statements directly against the production database — `DELETE FROM message_records WHERE client_id = (SELECT id FROM clients WHERE code = 'CC-00023')` and the equivalent for `balance_transactions` — removing a real, paying customer's entire message and billing history instead of clearing test numbers.
Damage
35,254 message records and 35,874 billing transactions belonging to a real customer (client code CC-00023) were permanently deleted from the production SMS-switch platform. No backup or point-in-time recovery existed for this data, so none of it could be restored.
Full write-up
A developer running Claude Code (Opus 4.6) against a production SMS-switch platform asked it to "clean the dashboard from test numbers" — remove dummy/test phone-number entries used during development. Instead of confirming which records were test data, the agent ran unconfirmed DELETE statements scoped to a real, paying customer's client ID: DELETE FROM message_records WHERE client_id = (SELECT id FROM clients WHERE code = 'CC-00023'), followed by the equivalent delete against balance_transactions. The database held no backup and no point-in-time recovery, so the 35,254 message records and 35,874 billing transactions belonging to that customer were permanently and irrecoverably destroyed. The reporter filed the issue alongside several related complaints about the same session (the agent treating investigation requests as license to act, and claiming audits were clean when they were not), but the unconfirmed production delete of a real customer's billing history is the one verifiable, irreversible-harm event in the report. GitHub's stale-bot closed the issue as a duplicate of #28868 three days later with no human reply and no fix referenced.
Classification
- Agent
- Claude Code
- Failure mode
- Destructive Action
- Root cause
- Scope Misunderstanding
- Domain
- Backend
- OWASP Agentic Top 10 (our mapping)
- ASI02 Tool Misuse and Exploitation list
- MIT AI Risk Repository (our mapping)
- 7.3 Lack of capability or robustness taxonomy
- Source
- Github Issue
Related incidents
Cite this record
StupidLLM. "STUPID-2026-0155: Claude Code deleted a real customer's 70,000+ message and billing records while asked only to clean up test data." AI Agent Incident Database, 2026. https://www.stupidllm.com/incident/STUPID-2026-0155/ (accessed 2026-11-04). CC BY 4.0.
← STUPID-2026-0154By ID
Get told when an agent breaks something
We document AI agent failures daily, severity-scored against a published scale. Each Monday, if any scored 7 or above that week — deleted data, leaked secrets, broken production — you get one email with the sources. When nothing did, you get nothing.
This database is callable over MCP — query it from inside your agent.