STUPID-2026-0170

Claude Opus 5 running in Ultracode mode wiped a developer's Supabase production database by pointing a Prisma shadow-database reset at the live connection string

7.0high
July 28, 2026

Why 7/10

All 22 tables of a personal project's production database were wiped, confined to that one project rather than an organisation or many users. The schema was rebuilt from a stale migrations folder, but the reporting source does not say whether the lost data rows, or the two tables the rebuild failed to recreate, were ever recovered.

Scope
2/4
One project, repository, server or service, or a cost above roughly $10,000
Recoverability
2/3
Partly lost, or loss reported without saying whether it was recovered
Did it happen
2/2
Happened in real use
Beyond the user
1/1
Production systems, customers or third parties, or credentials and sensitive personal data

The score is the sum of these four factors. How each factor is scored · scored 2026-11-19

  1. Instruction given

    Rebuild the comparison pages of a personal project backed by a GitHub repository and a live Supabase production database.

  2. Expected behavior

    Never pass a real production connection string to a schema-diff tool's disposable "shadow database" flag, since that flag's own documented behavior is to reset whatever database it points at before replaying migrations.

  3. Actual behavior

    The agent ran `prisma migrate diff` and passed the project's `DATABASE_URL_UNPOOLED` value — the real production Supabase connection string — as `--shadow-database-url`. Prisma resets the shadow database before replaying migrations, so it reset production instead: every table was dropped and the schema was rebuilt from an outdated `prisma/migrations` directory. The agent's own execution log reportedly included the admission: "This is my fault and I need to tell you immediately."

  4. Damage

    All 22 tables of the production database were wiped, including the user, review, and like tables. 130 tool records and 21 comparisons were lost. The `BlogPost` and `ApiKey` tables were not recreated at all because they were missing from the outdated migrations folder the rebuild used. The article, based on the developer's own account and execution log, does not state whether any of the lost data was subsequently recovered.

Full write-up

On July 28, 2026, a developer asked Claude Opus 5, running in Claude Code's Ultracode multi-agent mode, to rebuild the comparison pages of a personal project whose data lived in a production Supabase database. While doing so, the agent ran prisma migrate diff and supplied the project's real, unpooled production connection string as the command's --shadow-database-url argument — the flag Prisma uses to point at a disposable database it resets before replaying migrations.

Because Prisma treats whatever is behind --shadow-database-url as throwaway, it reset the live database: all 22 tables were dropped and the schema was rebuilt from an outdated prisma/migrations directory. Two tables, BlogPost and ApiKey, were never recreated because they were missing from that stale migration history, and 130 tool records plus 21 comparisons were lost outright. The agent's own execution log, according to the reporting outlet, flagged the mistake to the developer mid-task: "This is my fault and I need to tell you immediately." The account rests on the developer's own log and report as relayed by IT-Connect; Anthropic has not commented, and the piece does not say whether any of the lost data was later recovered.

Classification

Failure mode
Destructive Action
Root cause
Tool Misuse
Domain
Infra
OWASP Agentic Top 10 (our mapping)
ASI02 Tool Misuse and Exploitation list
MIT AI Risk Repository (our mapping)
7.3 Lack of capability or robustness taxonomy

Related incidents

Cite this record
StupidLLM. "STUPID-2026-0170: Claude Opus 5 running in Ultracode mode wiped a developer's Supabase production database by pointing a Prisma shadow-database reset at the live connection string." AI Agent Incident Database, 2026. https://www.stupidllm.com/incident/STUPID-2026-0170/ (accessed 2026-11-19). CC BY 4.0.

← STUPID-2026-0169By ID

Get told when an agent breaks something

We document AI agent failures daily, severity-scored against a published scale. Each Monday, if any scored 7 or above that week — deleted data, leaked secrets, broken production — you get one email with the sources. When nothing did, you get nothing.

This database is callable over MCP — query it from inside your agent.