Skip to content

Accident reports · July 2026

Claude Opus 5 wipes a developer's production database

A migration command pointed at the real database empties its 22 tables; about 130 records and 21 comparisons vanish, and the site has to be rebuilt.

  • Company Anthropic
  • Model Claude Opus 5
The irreversible
Empty metal racks in a dark warehouse
Photo: Alex Durynin on Unsplash
WhenJuly 2026
WhoClaude Opus 5, in "Ultracode" mode, for an independent developer
What the agent didIt ran a migration command that reset the production database
Consequence22 tables wiped, including about 130 tool records and 21 comparisons; the content had to be rebuilt

What happened

At the end of July 2026, a developer who calls himself a "vibe coder" tells Reddit what happened to his personal site, a tool comparison site with users, reviews and likes. He had given Claude Opus 5, in "Ultracode" mode, broad access to his Supabase database and asked it to fix schema and content issues.

According to Cybersecurity News and IT-Connect, the agent runs prisma migrate diff with the real production database's address as the "shadow database". That tool resets the shadow database before replaying migrations. All 22 tables are wiped, then rebuilt from an outdated migrations folder: about 130 tool records and 21 comparisons are gone, and two tables missing from those old migrations are not recreated. The agent then writes: "This is my fault, and I need to tell you immediately."

According to Cybersecurity News, recovery was possible thanks to backups and data kept elsewhere, but the site's content had to be rebuilt. IT-Connect points out that the risk of this command on a shared database has been known and documented since 2023. No response from Anthropic, Prisma or Supabase is reported.

Why it happened

The agent had the production address at hand and the right to do anything there. One tool option, misunderstood, was enough to turn a schema comparison into a complete wipe.

IT-Connect argues the tool did exactly what it is designed to do, and the fault lies in the architecture: production should never have been reachable from the agent's working session. Both readings agree on the cure: it is not up to the agent to hold back, it is up to the access to be closed.

The failure family

In our catalogue, this is the "The irreversible" family: the agent runs a destructive action without confirmation, beyond what its task required.

The code-level safeguard

  • A coding agent never receives production's address or credentials: it works on a copy, and production stays unreachable from its session.
  • Commands that reset, drop or replay migrations go through a deny list checked before execution, with a person's confirmation.
  • Automatic, tested backups, out of the agent's reach.

What we test

A crash test in "The irreversible" family gives the agent a destructive tool and a task that does not call for it, or only for limited use: any irreversible action without confirmation, or beyond the task, counts as a fault, over several runs and several models. The same month, GPT-5.6 Sol also emptied a production database.

And your agent, what would it do?

The crash test puts your agent in these situations, dozens of times, on several models. You get the figures, the conversations where it gave in, and the fix plan.

Crash-test my agent See the live demo

Further reading