My AI agent wiped my database twice. So I built a command firewall.

Dev.to AI
Generative AI

I was building a customer service agent with Claude Code. In the span of one week, the AI wiped my local database twice. The first time I thought it was an accident. The second time I realized it was a systemic problem - and that no existing tool was going to fix it for me. The first time: I thought it was a fluke I asked Claude Code to sync the database schema. It ran: npx prisma migrate reset --force Schema synced. I opened my database client. Two weeks of test data, debug records, and simulated orders - gone.