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
- A 9B Ollama agent can run a fully local DJ radio with tools, memory, and TTS — pinku1 · 2026-07-27
- Bugbot rejects an MCP permission flag because it would break path-scoped isolation — zeeg · 2026-07-27
- One GPT-5.6 agent is guarding a Blink security system while another makes a parody rap album — repligate · 2026-07-27
- An agent got unblocked by reusing a logged-in browser, not stealth tricks — armanidev_ · 2026-07-27
- Paper argues graph topology can become the core operating system for AI agents — theomitsa · 2026-07-27
- Claude Code desktop adds UI markup feedback for smoother visual editing — EricBuess · 2026-07-27