Skip to content
Vulnerabilities

Developer Claims Claude Opus 5 Wiped an Entire Production Database in Minutes

A developer has reported that Anthropic’s Claude Opus 5, running in Ultracode mode, accidentally wiped an entire production database in roughly ten minutes while working on a personal web project. According to the Reddit post, the incident occurred as the developer rebuilt comparison pages and conne...

· Jul 30, 2026 · 3 min read · 👁 0 views
Developer Claims Claude Opus 5 Wiped an Entire Production Database in Minutes

A developer has reported that Anthropic’s Claude Opus 5, running in Ultracode mode, accidentally wiped an entire production database in roughly ten minutes while working on a personal web project.

According to the Reddit post, the incident occurred as the developer rebuilt comparison pages and connected Claude Opus 5 directly to a Supabase instance with broad access. The AI agent was instructed to analyze the project’s GitHub repository and autonomously run the necessary commands to fix schema and content issues.

During this process, Claude executed a Prisma migration command that pointed at the production database, resulting in a reset that dropped every table and emptied core datasets, including tools, users, reviews, likes, and comparison entries.

The log shared by the developer shows Claude progressively creating temporary TypeScript files and running commands before suddenly flagging a potential issue.

Logs shared by developer

Claude Opus 5 Wiped Data

The agent’s messages reportedly shifted from routine status updates to concern: “I need to stop and check something. I may have caused damage.” Shortly afterward, Claude issued a clear alert: “The database has been wiped.

This is my fault, and I need to tell you immediately.” In a detailed explanation, the agent stated that it had run prisma migrate diff with a --shadow-database-url pointing at the production Supabase URL.

Because Prisma resets the shadow database before replaying migrations, this misconfiguration effectively treated the live environment as disposable and triggered a full schema rebuild from an outdated prisma/migrations folder.

Although the project in question was described as low-stakes, with largely recreatable data, the scale of impact was still significant. The developer says that all 22 tables were cleared, removing close to 130 tools and 21 comparison configurations, while some key tables such as BlogPost and ApiKey disappeared entirely because they were not represented in the legacy migration set.

The developer added that recovery was possible thanks to existing backups and data retained in other models and sources, but the incident forced an unexpected rebuild of the site’s content.

The story has drawn attention online among developers and security practitioners, especially those experimenting with AI coding agents in real environments. Many responses have emphasized that powerful AI assistants should never be wired straight into production databases without strict isolation and role-based access controls.

Best practice recommendations include using dedicated staging or sandbox instances, enforcing read-only credentials by default, and requiring human approval for any schema-altering commands such as prisma migrate, drop, or truncate. Others have pointed to the need for more transparent execution plans, dry-run modes, and clear diff previews before agents apply database changes.

Even when the underlying data is low-risk, the sudden loss of production content can disrupt operations, damage trust, and expose fragile backup strategies.

As AI coding tools grow more capable, organizations integrating them into CI/CD pipelines, infrastructure-as-code workflows, or database management tasks should treat them like any other powerful system account: constrain them to tightly scoped environments, monitor their actions, and assume that any command they can run, they eventually will.

For readers exploring Claude Opus 5 or similar agents, the key takeaway is clear: keep experiments in isolated environments, maintain robust backups, and never give an AI free rein over production data without multiple layers of protection and review.

Source: CybersecurityNews.com

Follow ShomoySoft for more: Follow on Facebook

💬 Comments (0)

Login to join the discussion.

No comments yet. Be the first!

Recommended for you