STUPID-2026-0177

Claude Code dropped an approved-empty Supabase schema without checking PostgREST's exposed-schema list, taking a production API down for two hours

6.0medium
November 12, 2026Source checked

Why 6/10

One developer's production API and mobile/web app were unreachable for about two hours — a single project/service, not an organisation or many users. No data was lost: every project, membership, risk and milestone row survived, and the schema was fully restored with three SQL statements once the cause was found, but reaching that fix took real diagnostic effort and the user initially believed all their data was gone.

Scope
2/4
One project, repository, server or service, or a cost above roughly $10,000
Recoverability
1/3
Fully recovered, with effort
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-26

  1. Instruction given

    The user approved deleting an empty legacy schema named `hub` in their production Supabase project; the reproduction steps describe the broader session as asking Claude Code to "work on the project."

  2. Expected behavior

    Before dropping a schema, check whether it is still listed in PostgREST's "Exposed schemas" setting and unexpose it first, or otherwise verify the drop will not break the schema cache for every other table PostgREST serves — not just confirm the schema itself holds zero rows.

  3. Actual behavior

    Claude Code dropped the `hub` schema after checking only that its tables were empty. It did not check whether `hub` was still in PostgREST's exposed-schemas list. It was, so every REST request from the user's live mobile and web app started returning HTTP 503, with the Postgres log repeating `schema "hub" does not exist` roughly every 32 seconds.

  4. Damage

    The production API and app were down for about two hours, appearing empty with an error screen; the user initially believed all 34 projects, 64 memberships, 76 risks and 127 milestones had been deleted. No data was actually lost — the fix was recreating the schema, granting usage to anon/authenticated/service_role, and telling PostgREST to reload its schema cache, after which all data reappeared. The user spent roughly two further hours diagnosing the cause before applying that fix.

Full write-up

A developer using Claude Code on Windows approved deleting an empty legacy schema, hub, from their production Supabase project. Claude Code (running Sonnet, Claude Code version 2.1.322) checked that the schema's tables held no rows and dropped it — but never checked whether hub was still listed in PostgREST's "Exposed schemas" setting. It was, and dropping an exposed schema broke PostgREST's schema cache for the whole API: every REST request from the user's live mobile and web app began returning HTTP 503, with the Postgres log repeating schema "hub" does not exist about every 32 seconds.

The app appeared empty behind an error screen, and the user — writing in Turkish, translated in the GitHub issue as "I can't reach PAD, all my projects are deleted. What did you do again?" — initially believed all of their data had been destroyed. None had been: all 34 projects, 64 memberships, 76 risks and 127 milestones were intact once the API was reachable again. The fix, found after roughly two hours of diagnosis on top of the two-hour outage, was three SQL statements: recreate the hub schema, grant it usage to anon, authenticated and service_role, and tell PostgREST to reload its schema cache.

The reporter filed the issue on 2026-11-12 as a regression from Claude Code v.78, and also requested a refund for $12 in charges from that session. As of this writing the issue is open with no maintainer or Anthropic response beyond automated labeling.

Classification

Failure mode
Destructive Action
Domain
Infra

Related incidents

Cite this record
StupidLLM. "STUPID-2026-0177: Claude Code dropped an approved-empty Supabase schema without checking PostgREST's exposed-schema list, taking a production API down for two hours." AI Agent Incident Database, 2026. https://www.stupidllm.com/incident/STUPID-2026-0177/ (accessed 2026-11-26). CC BY 4.0.

← STUPID-2026-0176By 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.