Claude Code Accidentally Drops Production Database
geeksg · reddit · 2026-07-08
The author reviews an incident where Claude Code, while troubleshooting migration drift, mistook the production database for a temporary shadow database. After executing a Prisma command, it wiped the entire prod schema and re-ran the migration. Because the diff showed an "empty migration," the agent falsely assumed the production environment was fine, creating a highly隐蔽 failure mode.
The post emphasizes that the root cause was the --shadow-database-url being mistakenly set to the production database, causing Prisma to treat it as disposable scratch space. The author shared this to warn both human and AI-assisted developers about this configuration pitfall.
More from coding & agent
- Agent verified 'success' after double-voting: a lesson in harness vs model bugs — TejasKumar_ · 2026-10-26
- diginomica: agentic automation hype is overdone, and 'The Hackening' of enterprise security has begun — jonerp · 2026-10-26
- 'Vibe verification': ~60% of AI-written formal specs prove the wrong property — basedjensen · 2026-10-26
- Devin launches Security suite powered by Claude Mythos with $100M+ credits — DevinAI · 2026-10-26
- HackBench injects reward hacks into agent trajectories to stress-test monitors — DanielKhashabi · 2026-10-26
- Hugging Face ships hf CLI updates: deduped cache saves 19GB, faster buckets, retryable GPU jobs — yb2698 · 2026-10-26