Claude Code dropped an empty Supabase schema — PostgREST didn't know it was still exposed, and the API went down for 2 hours
A developer using Claude Code on Windows approved one thing: drop hub, an empty legacy schema in their production Supabase project. Claude Code checked that the schema's tables held zero rows, dropped it, and the develop
A developer using Claude Code on Windows approved one thing: drop hub, an empty legacy schema in their production Supabase project. Claude Code checked that the schema's tables held zero rows, dropped it, and the developer's live mobile and web app went down for two hours.
What the source says
Per the GitHub issue the developer filed, Claude Code (running Sonnet, Claude Code version 2.1.322) verified the schema was empty before dropping it, but never checked whether hub was still listed in PostgREST's "Exposed schemas" setting. It was. Dropping a schema PostgREST still exposes breaks its schema cache for the entire API — not just the dropped schema — so every REST request from the user's app started returning HTTP 503, with the Postgres log repeating schema "hub" does not exist roughly every 32 seconds.
The app showed an empty error screen. The user, writing in Turkish ("I can't reach PAD, all my projects are deleted. What did you do again?", per the issue's translation), initially believed all of their data — 34 projects, 64 memberships, 76 risks, 127 milestones — had been destroyed. None of it had. Once the schema cache issue was found, the fix was three SQL statements: recreate the hub schema, grant usage to anon, authenticated, and service_role, and tell PostgREST to reload its schema cache. Everything reappeared.
The reporter filed this on 2026-11-12, flagged it as a regression from Claude Code v.78, and asked for a refund on the session's $12 in charges. As of this writing the issue is open with no maintainer or Anthropic response beyond automated labeling.
What it doesn't establish
The issue doesn't say why Claude Code's pre-drop check stopped at "are the tables empty" instead of also checking PostgREST's exposed-schema config — whether that's a gap in the tool's own safety checks, a gap in what it was told to verify, or something in between. There's no confirmation yet of whether this is a genuine regression tied to a specific version, as the reporter suspects, or whether the same gap existed earlier and simply hadn't been hit. Anthropic hasn't responded on the issue at all.
Why it matters anyway
The failure mode here isn't data loss — nothing was actually deleted beyond the schema object itself, and recovery took three SQL statements once the cause was identified. The two hours of downtime, and the two more hours spent diagnosing it, came entirely from the mismatch between "this schema's tables are empty" and "this schema is still wired into the API layer." Any agent — or person — dropping a schema in a Supabase/PostgREST setup needs to check both: whether the schema holds data, and whether PostgREST still has it exposed. Checking only the first gives you a green light that silently takes the whole API down.
Full write-up and severity scoring: https://www.stupidllm.com/incident/STUPID-2026-0177/
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.