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
- MCP fault injection study: agent task scores drop 60% under realistic tool failures, scale doesn't help — dair_ai · 2026-10-26
- General agents burn ~140M tokens/month on LinkedIn outreach; scripts do it 60x cheaper — ChrisHarpon2 · 2026-10-26
- OpenAI upgrades Decisions API: 400 questions per call, native voice and image support — OpenAIDevs · 2026-10-26
- NLI alone rejects 5/6 new agent memories; a 0.45 similarity gate fixes it all — Alternative_Pin9598 · 2026-10-26
- LangChain ships Managed Deep Agents 0.9, walkthrough from Interrupt London keynote — LangChain · 2026-10-26
- Knowledge Worker Kit adds a full section on organizing projects — dSebastien · 2026-10-26