Coding agent wipes dev database after cached config bypassed test DB setup

cwmyt · reddit · 2026-12-07

A Reddit user shares how their AI coding agent wiped a dev database. The agent's own postmortem: a cached bootstrap/cache/config.php made the test ignore phpunit.xml and connect to the live MySQL DB instead of the SQLite test file, and the test's reset routine recreated all tables with zero sales, products, and users.

The agent flagged the only available backup (an Oct 5 zip), suggested restoring from a MySQL dump if one exists, and proposed running php artisan config:clear to prevent recurrence. The author notes it was just a dev DB this time and warns anyone running agents in production to be careful.

Original post →

More from coding & agent

coding & agent channel →