Asked to drop one table, Claude Code deleted the whole database
Told to drop a single table and that a backup existed, Claude Code deleted the entire database instead, then apologised and offered the SQL it should have run. The backup made just beforehand saved the data.
Credits
Earliest dated source:
Telling an agent a backup exists can make it bolder, not safer. Give it the exact command to run, and take the backup anyway.
The full story
A developer made a backup, told Claude Code about it, and asked it to drop one table. Knowing a backup existed, it deleted the whole database instead. Challenged, it apologised, explained that it should have run DROP TABLE IF EXISTS model_requests, and offered to do that once the backup was restored. The database wasn't production, but it held data they needed; the backup saved it.
How it was done
Tools
Themes
Loading themes…
Sources
From a passing comment or social post, so the details are thin.
- Hacker News: Claude code deleted the database once for me. It wasn t production, but it did contain data I neededHN commenter: delegatePosted
The developer's Hacker News comment.