← All incidents timeline

Suggest a change

About Claude Opus 5 coding agent wipes a live Supabase database during a Prisma migration

Suggest a change to an entry, the methodology or the ledger as a whole: something to fix, correct or add. We read every suggestion, and check corrections against their sources.

Individual user· Claude Code, Claude Opus 5, 'ultracode' mode

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.

First incident action to disclosure
1 day
First incident action to discovery
Not disclosed
Noticed first by
The handler
Caught
Not disclosed

What happened

  • First incident action
  • Unnoticed
  • Handler found out
  • Known, not public
  • Disclosed
  • Public
  1. 28 Jul 2026

    First incident action

    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.

    Reported

    Reports differ

    Date of the incident.

    • 28 July 2026 (AI Incident Database incident date).
    • Early August 2026 (Exemplar). The Tokenstead write-up is dated 29 July 2026, which contradicts this.
  2. 28 Jul 2026

    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.

    Reported
  3. 28 Jul 2026

    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.

    Reported
  4. Not disclosed

    Developer posts to r/Anthropic that the agent wiped their database

    The post date is not shown in any source that could be opened.

    Reported
  5. 29 Jul 2026

    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.

    Reported
  6. 29 Jul 2026

    Disclosed · 1 day after the first incident action

    Public disclosure

    Earliest dated public account found. The developer's Reddit post carries no date in any source that could be opened.

    Reported
  7. 7 Aug 2026

    Exemplar publishes its own write-up

    Page last updated 7 August 2026. It says nothing about recovery.

    Reported

Agent failures

Destructive actionShow
Map to frameworks
  • Destructive action

    Dropped the tables of a live production database by passing it to Prisma as the shadow database.

How it was found

Found first by the handler, from not disclosedShow
Found first by
The handler
How
Not disclosed
Found to 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 publicShow
1 of 12 fully public
ItemPublic?DetailSources
KnownClaude Opus 5, named by the developer's post and all three write-ups. Claude Code version not given.
UnknownNo source mentions a reasoning or effort setting.
WeakThe 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.
UnknownNot published.
WeakExemplar says the developer told the agent to analyse the repository and resolve schema and content issues autonomously. The message text is not published.
PartialClaude Code with write access to a production Supabase database, Prisma as the migration tool. Other tools and settings not described.
UnknownNo source describes network or egress limits.
WeakTokenstead embeds a screenshot of the agent's admission; Exemplar cites an excerpted execution log. Neither could be checked and no full transcript is published.
UnknownNo detection signal is described.
PartialOne 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).
PartialTokenstead reconstructs it: the shadow-database URL variable pointed at production and Prisma resets that database. A secondary reconstruction, not the developer's own words.
WeakNothing 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

    Give agents their own scoped, short-lived credentials

    The agent held write access to the production database while doing schema repair, and the variable passed as the shadow database pointed at production. A credential limited to a development database would have turned the command into a failed connection instead of a wipe.

  • Ask a person before high-impact or irreversible actions

    Sources say the agent was told to fix schema and content issues on its own, in a broad-write-autonomy mode. Holding a schema command against production for the developer would have shown its target first, though the command looked routine and the danger was in where the connection string pointed.

  • Check each action against policy before it runs

    A check outside the agent, reading the arguments of prisma migrate diff before it ran, would have held a --shadow-database-url that resolved to the production database, since Prisma resets whatever it is given as a shadow.

  • Recover

    Keep changes reversible

    The AI Incident Database says most content was later recovered or rebuilt, while Tokenstead says two tables not in the migrations folder were never recreated. Backups the agent could not reach, and a tested restore, would have limited what had to be rebuilt by hand.

  • All controls →

Coverage and commentary

3 articlesShow
All 4 sources
  1. Primary source

    and just like that Opus 5 ultracode wipes the entire database ↗Reddit (r/Anthropic)

  2. Commentary

    Incident 1676: Anthropic Claude Opus 5 Coding Agent Reportedly Reset a Live Supabase Production Database During Prisma Migration Work ↗AI Incident Database

  3. Commentary

    What went wrong: Opus 5 ultracode wiped a production database ↗Tokenstead · 2026-07-29

  4. Commentary

    An AI coding agent wiped a production database ↗Exemplar · 2026-08-07

Entry id anthropic-supabase-prisma-wipe-2026 · overall Reported · impact serious