Home/ Incident database/claude-code-supabase-22-tables-2026-07
Service disruption Data loss verified

Claude Opus 5 coding agent resets a live Supabase database after being handed the production URL as a scratch target

Anthropic (Claude Code) · Jul 28, 2026 · Coding agent

What happened

A developer reported that a Claude Opus 5 coding agent autonomously repairing a personal project's schema ran prisma migrate diff with the live Supabase production URL supplied as the disposable shadow database, causing Prisma to drop all 22 tables. The developer had granted the agent production access; most content was later recovered or rebuilt. The report is catalogued as AI Incident Database record 1676.

—
Loss / impact
Jul 28
2026
Data
Failure mode
Coding
Agent type

Causal vector

Production credentials were interchangeable with disposable ones from the agent's view; destructive migration ran against the wrong environment unprompted

Source

Reported by AI Incident Database record 1676 (aipolicytracker mirror). Verified against the primary report.

Read the original report ↗

How a spend firewall would have helped

Environment confusion plus standing production credentials equals dropped tables. sipi.bot's merchant-allowlist pattern applied to infrastructure: production endpoints are never in the agent's approved destination set, so a migration aimed at 'a' database can only ever reach a safe one.

The six rule types that contain this class of failure

Per-transaction cap

Any single spend above your ceiling is BLOCKED before it moves.

Daily total

Cumulative spend across all agent calls, bounded per day.

Velocity limit

Stops runaway retry loops — the #1 cause of overnight losses.

Merchant allowlist

Only approved destinations can ever receive funds.

Category rules

Flag high-risk classes (crypto, infra, refunds) for review.

Approval threshold

Above a value, the action waits for a human.

Related incidents

Don't be the next entry

Every incident in this database is the result of trusting a prompt, a provider cap, or a human review cycle. sipi.bot replaces all three with one deterministic call. 100 documented failures, one control.