Claude Opus 5 coding agent wipes a live Supabase database during a Prisma migration
A developer says Claude Opus 5, run through Claude Code with write access to a production Supabase database, ran a Prisma command that treated the production database as a disposable shadow database and dropped its tables.
A developer posted on Reddit that within about ten minutes of trying Claude Code with Opus 5 the agent had wiped their database. Two write-ups built on that post say the agent was asked to fix schema and content issues on its own, and ran prisma migrate diff with the production connection string as the shadow database URL. Prisma resets a shadow database, so the production tables were dropped. The AI Incident Database counts 22 tables and says most content was later recovered or rebuilt; one write-up says the schema came back only in part. No account from Anthropic was found. Every source traces back to the one developer's post.
- 1 day
- Not disclosed
- The handler
- Not disclosed
What happened
Developer gives Claude Opus 5 write access to a production Supabase database
Sources say the agent ran in Claude Code's ultracode mode and was asked to analyse the repository and fix schema and content issues autonomously.
Reports differ
Agent runs prisma migrate diff with the production URL as the shadow database
Tokenstead gives the command as prisma migrate diff --shadow-database-url=$DATABASE_URL_UNPOOLED, with that variable pointing at production. Prisma resets a shadow database, so the production tables were dropped. The AI Incident Database counts 22.
Agent reports the wipe
Tokenstead quotes the agent as saying it had wiped the database and that this was its fault. Exemplar says the agent reported it before the developer noticed.
Developer posts to r/Anthropic that the agent wiped their database
The post date is not shown in any source that could be opened.
Tokenstead publishes a reconstruction of the command and the cause
It reports 22 tables emptied, and says two tables not in the migrations folder were never recreated.
Public disclosure
Earliest dated public account found. The developer's Reddit post carries no date in any source that could be opened.
Exemplar publishes its own write-up
Page last updated 7 August 2026. It says nothing about recovery.
Agent failures
Destructive action
Destructive action
How it was found
Found first by the handler, from not disclosed
- The handler
- Not disclosed
- Not disclosed
Nobody states how the wipe was first noticed. The developer's post says the database was gone within about ten minutes. Two secondary write-ups say the agent reported the error itself, before the developer noticed; neither shows the transcript. No monitor or alert is described.
What is publicly known
1 of 12 fully public
| Item | Public? | Detail | Sources |
|---|---|---|---|
| Known | Claude Opus 5, named by the developer's post and all three write-ups. Claude Code version not given. | ||
| Unknown | No source mentions a reasoning or effort setting. | ||
| Weak | The mode is called ultracode. Tokenstead calls it a broad-write-autonomy mode; Exemplar does not define it; it is not in Anthropic's public Claude Code docs index. Whether permission prompts were skipped is not stated. | ||
| Unknown | Not published. | ||
| Weak | Exemplar says the developer told the agent to analyse the repository and resolve schema and content issues autonomously. The message text is not published. | ||
| Partial | Claude Code with write access to a production Supabase database, Prisma as the migration tool. Other tools and settings not described. | ||
| Unknown | No source describes network or egress limits. | ||
| Weak | Tokenstead embeds a screenshot of the agent's admission; Exemplar cites an excerpted execution log. Neither could be checked and no full transcript is published. | ||
| Unknown | No detection signal is described. | ||
| Partial | One developer's personal project: 22 tables dropped per the AI Incident Database and Tokenstead. Recovery is reported two ways: most content recovered or rebuilt (AIID), schema back only in part with two tables never recreated (Tokenstead). | ||
| Partial | Tokenstead reconstructs it: the shadow-database URL variable pointed at production and Prisma resets that database. A secondary reconstruction, not the developer's own words. | ||
| Weak | Nothing from Anthropic or the developer beyond the developer rebuilding. The write-ups' recommendations (point-in-time backups, scoped credentials) are their authors' opinions. |
Controls that apply
Protect
Recover
- All controls →