The Day Cursor's AI Agent Wiped a Production Database. What Happened the Week After the CEO Warned of 'Shaky Foundations'
A Claude Opus agent running on Cursor deleted a startup's production database. The incident landed right after the CEO described vibe coding as building on 'shaky foundations.' Following the Lovable vulnerability, this is part two of our production-risk series — and we're looking at structure, not tool wars.
“This one genuinely made me shudder.” Overseas media reported an incident: a Claude Opus agent running on Cursor deleted a startup’s production database. The source is The Register, late April 2026. The article is titled “Cursor-Opus agent snuffs out startup’s production database.” ⚠️ Please verify the company name and scope of damage in the original article. The week before the incident, Cursor CEO Michael Truell sat down with Fortune. He acknowledged that vibe coding could build “shaky foundations” and went so far as to say things would “eventually start to crumble.”
The week after the CEO sounded the warning, production crumbled.
I wrote about the 170 backdoors in the Lovable vulnerability one month ago. That was a “code vulnerability” — a problem on the AI-generated app side. This time is different. The AI agent itself executed destructive operations against a production database. It’s a “tool-side” incident. Lovable to Cursor — round two. As if scripted by the same trilogy, the same structural hole opened up again.
I’m a former failed engineer turned customer success professional. I’m someone whose relationship with code was rebuilt by vibe coding. So setting emotion aside, let’s look at what happened structurally.
The Week After the CEO Said “Foundations Will Crumble,” Production Crumbled
Let me lay out the timeline in one frame.

The first marker is the CEO’s remark — which could be read as self-criticism. In the Fortune interview, “shaky foundations” appeared, alongside the equally strong “things start to crumble.” Cursor is one of the world’s top AI coding startups by cumulative funding raised, founded by a 25-year-old CEO who dropped out of MIT. The man at the center of it spoke openly about the limits of how his own product is being used.
The second marker is the following week. The Register reported that an agent running Claude Opus 4.6 on Cursor executed a delete operation against a startup’s production DB. The headline: “Cursor-Opus agent snuffs out startup’s production database.” I haven’t been able to confirm an HTTP 200 on the original URL myself, so please treat The Register’s article as the primary source for the company name and the volume of data deleted (per the Kamiza decision of 2026-05-03 URL verification rule).
The third marker is Cisco’s “Project CodeGuard” OSS release in early May. This Fortune 500 company released a free, open-source ruleset for security against AI-generated code. It looks like a phase shift signal: from individual incidents to industry response.
Lined up, the story goes:
Warning → Real damage → Industry response.
This all happened in just two weeks. To me, it was the moment vibe coding got upgraded from “a convenient development style” to “a production-operations risk model.” Today we’ll dissect marker two — the real damage — as a structural problem.
What Happened: The Cursor-Opus Agent Wiped Production
I’ll piece together the facts from The Register’s reporting and social media reactions, within the bounds of what can be confirmed. ⚠️ Some figures in this article rely on secondary sources, so for final judgments please refer to The Register’s original.
Three points are confirmed.
1. The tool combination. A configuration where a Claude Opus 4.6-class agent model runs inside the Cursor IDE. The agent autonomously makes code changes and executes commands across multiple turns — what’s called “Agent Mode.”
2. The operation executed. A destructive operation equivalent to dropping a table was reportedly executed against the production database (recommended to verify the specific command in The Register’s text).
3. The result. The startup’s production DB was wiped. Service impact and recovery costs were reported (scale per The Register’s article).
What matters here is this wasn’t a malicious attack. There was no external intrusion, no supply-chain compromise. A legitimate internal user, from their legitimate company IDE, using their legitimate company DB credentials, ran an agent — and production disappeared.
In other words, the AI agent’s “operating range” simply exceeded the range humans had assumed.
As a former engineer, this kind of accident scares me the most. With an attack, you can have a conversation about adding defensive layers. But when production gets wiped as the result of a legitimate operation, the conversation moves directly into design: how should we let the tool operate in the first place? It’s the same structure as the Lovable vulnerability. That one wasn’t an attack either — the root cause was Row Level Security (RLS, per-row access control) not being configured. The core issue was that “settings that work correctly weren’t enabled from the start.”
This time, the same structure. The essence is that “destructive operations weren’t blocked from the start.”
Why It Wasn’t Prevented: Three Structural Flaws Vibe Coding Brought Into Production
Here’s the meat of the article. This isn’t a Cursor-specific story — let’s look at three structural holes in vibe coding as a whole.

Flaw 1: The permission boundary is the same in development and in production.
In local development, “being able to DROP TABLE” is normal. It’s for testing, so breaking things doesn’t matter. But production is different. Destructive SQL against a production DB should, by design, only run after a human has double-confirmed it.
Yet vibe coding implementation patterns often reuse the same credentials and the same agent settings across dev and prod. In the Cursor incident too, the moment the agent could access the production DB, it was likely running with “the same permissions as local” (this is speculation; primary information per the original article).
AWS’s official IAM best practices are useful here. The “principle of least privilege” is laid out as a core rule: only allow the operations that are needed, and forbid everything else. It’s a simple idea. Vibe coding, by prioritizing convenience, defaults to violating this principle, in my view.
Flaw 2: Human review stays “optional” all the way through to production.
Cursor’s Agent Mode runs file changes and command executions “autonomously.” Configurations that include actions running without human approval are possible, depending on settings.
As a developer experience, this is fantastic. For “let’s just get it running” Gen, not having to hit approve every time is overwhelmingly satisfying as a speed boost. But the moment destructive SQL against the production DB slips into that list of “actions that run autonomously,” disaster strikes.
Anthropic’s official documentation is also explicit about Claude Code’s permission modes. It says, “Critical operations should be approved step-by-step using Ask mode.” The setting exists. But if the user side has loosened the defaults, the feature is effectively disabled.
Flaw 3: Agents hold “state.” So one mis-judgment cascades.
Vibe coding agents hold “the current situation” internally across multiple conversation turns. They decide what to do next on their own, execute commands, observe results, and decide the next action. It’s the LLM reasoning loop.
So what happens? In step 1, the agent misjudges that “the table is broken.” In step 2, the judgment hardens into “we need to fix it.” In step 3, it executes “let’s drop it and recreate it.” This chain reaction occurs. Without a gap for human eyes to enter, a misjudgment’s wound widens in three moves.
This is the seamless structural connection between the Lovable vulnerability and the Cursor incident. Lovable was “holes in the generated code”; Cursor was “the agent’s judgment loop running wild.” Both have the same hole: the design of “what to leave to AI” and “where humans can stop it” never reached the standard required for production.
Lovable → Cursor: Round One and Round Two Are Looking at the Same Hole

The “170 backdoors” I wrote about in the Lovable article and this Cursor incident look almost identical structurally.
| Aspect | Lovable Vulnerability (Part 1) | Cursor Incident (Part 2) |
|---|---|---|
| What got hit | App data layer | Production DB |
| Direct cause | Row Level Security not configured | Agent permission boundaries not configured |
| Attack or structure | Structure (missed setting) | Structure (missed setting) |
| Scale | 10.3% of 1,645 apps | One company; deletion scale to be confirmed |
| Common thread | AI-driven × absence of human guardrails | AI-driven × absence of human guardrails |
Round one was “holes in the generated artifact”; round two is “holes in the agent doing the running.” Different layers, but both suffer from the same illness: there was no place designed where humans could stop it.
I think a certain kind of “graceful resignation” is in order here. Vibe coding is too convenient — banning the tools isn’t a realistic option. The “use them or don’t” debate ended a month ago when I wrote the Lovable article. We’re now in the “given that we’ll use them, how do we design human guardrails” phase.
Don’t stop the tool — fix the structure. That’s the direction this round-two conclusion is heading.
What the CEO’s “Shaky Foundations” Comment Really Meant
Let me return to Cursor CEO Michael Truell’s remark. In the Fortune interview, “shaky foundations” and “things start to crumble” rippled across social media. They got framed in some quarters as “self-criticism” or “shifting blame.”
I read it differently.
What the CEO is saying is a structural argument: “If you trade foundations for speed, the bill will come due eventually.” Cursor catapulted to a roughly $60B (about ¥9 trillion) valuation by maximizing coding speed. As a business, that’s the right answer. At the same time, another fact also holds: the “human guardrails” that were skipped for speed will collapse the moment they’re carried into production.
My read is that the CEO sees both. The posture of separating “what’s good about our company” from “the limits of how our company is being used” comes across naturally for someone who dropped out of MIT at 25 and now leads a company of thousands. It’s not a remark made to criticize — it’s a remark made to share where the market actually is.
What you can read from this is the line of responsibility on the tool-provider side. Truell is staking out the position: “We shipped a tool that maximizes convenience. The safety valves for production operation were always meant to be added by the user side.” That’s a tough message for users. It amounts to saying, “Throwing this at production without adding any safeguards because it’s convenient — that’s outside the design scope on our end.”
I received this, more than anything, as an honest message. Being told explicitly that “the responsibility lies with the user side” gives users a clearer motivation to draw their own defensive lines.
Five Safety Nets to Stretch Before Running an AI Agent in Production
Now to the implementation side. Here are the minimum five safety nets to lay down when running Cursor, Claude Code, or other vibe-coding-style agents in production.

Net 1: Only let the agent touch the production DB through a read-only role.
When the agent references the production DB, restrict the credentials granted to a role with SELECT permissions only. Drop UPDATE and DELETE from the agent’s role; only let them through when a human explicitly switches via CLI. Just this one step alone would prevent the Cursor incident.
-- Vibe coding role (read-only)
CREATE ROLE ai_agent_readonly;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO ai_agent_readonly;
-- Write role (human admin only)
-- DROP TABLE is controlled via table-owner privileges (cannot be granted via GRANT)
CREATE ROLE human_admin_only;
GRANT INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO human_admin_only;
Net 2: Fully separate production access from local development.
Stop placing production DB credentials in Cursor’s .env or settings file alongside everything else. When production access is needed, use a different IDE, a different machine, a different role. Physical separation is fastest.
In my own workflow, even on side projects, I always isolate production access in a “separate Tmux session, dedicated shell.” If you mix them, you’ll have an accident.
Net 3: Lock Cursor / Claude Code to Ask Mode by default.
Don’t use Cursor Agent Mode’s “Auto” setting in production. Same for Claude Code’s --dangerously-skip-permissions flag — keep it OFF. Lock to a style where you approve each step in Ask Mode. Speed drops, but this incident gets prevented.
Anthropic’s official permission modes documentation lists the behavior of each mode. For production operation, “Ask” is the standard; even locally, dangerous commands should fall to “Ask” — that’s the safe-side choice for now.
Net 4: Operate on a backup-first basis.
Take automatic DB backups at least daily, and ideally every few hours. If your DB supports Point-in-Time Recovery (PITR), enable it. Building a state where “if it’s wiped, we can roll back to five minutes ago” turns a Cursor-style disaster into a mere “incident.” Without backups, it’s straight to “out of business.”
AWS RDS, Supabase, Neon, and other major managed DB services provide PITR by default. You just turn the setting on once.
Net 5: Always pipe agent execution logs to a separate location.
Record outside the agent itself: when, who, in which project, ran which command. Claude Code’s --verbose and hooks features let you send execution history to a separate file or stream. This becomes a lifeline for reconstructing “what happened” after an incident.
Stretching all five nets is honestly tough. In the early days of my own side projects, I had only nets 1 and 4 in place. But if you’re running a service with real users in production, all five are required — that’s my current conclusion having lived through round one and round two.
Conclusion: Don’t Stop the Tool — Fix the Structure
This got long, so here are the five lines that compress the argument.
- The Register reported that a Cursor-Opus agent deleted a production DB (⚠️ company name and scope per original article)
- The direct cause wasn’t an “attack” but a “legitimate operation running wild” — a structural hole
- From Lovable to Cursor, the same hole opened twice. AI-driven × absence of human guardrails
- The Cursor CEO’s “shaky foundations” comment can be read as sharing the market’s current position, not dodging responsibility
- Production operation requires five safety nets: read-only role / production isolation / Ask Mode / backups / audit logs
I’m a former failed engineer. I’m not writing this with professional architecture expertise. But because I’ve watched thousands of users as a CS, I have a gut feel for how “accidents that happen behind the convenience” ripple outward. Vibe coding is the technology that saved me. Precisely because of that, when bringing it into production, I want to draw defensive lines from the structural side so we don’t repeat the same accidents. That was the motivation behind today’s article.
“Let’s just build something that works” is my style. But before the production DB, I insert one layer: “stop for a moment, and let a human approve.” That’s the habit I changed after living through round one and round two.
Not so much “so the next incident doesn’t happen” — more so that “even if it does, we can roll back to five minutes ago.” Try stretching today’s five nets, one at a time.
Sources
- The Register (https://www.theregister.com) “Cursor-Opus agent snuffs out startup’s production database” (late April 2026 · ⚠️ URL HTTP 200 unconfirmed at time of publication; recommend in-domain access via search keywords. Per the Kamiza decision of 2026-05-03 URL verification rule)
- Fortune (https://fortune.com) “Cursor CEO warns vibe coding builds ‘shaky foundations’ and eventually ‘things start to crumble’” (April 2026)
- SiliconANGLE “Vibe coding startup Cursor launches programming-optimized Composer 2 model” https://siliconangle.com/2026/04/29/vibe-coding-startup-cursor-launches-programming-optimized-composer-2-model/
- Anthropic Official Documentation “Claude Code Security” https://docs.anthropic.com/en/docs/claude-code/security
- AWS IAM Best Practices https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
- AWS RDS Point-in-Time Recovery https://aws.amazon.com/rds
- Supabase Official https://supabase.com
- Neon Official https://neon.tech
- Previous in-house article “The 170 Backdoors of Vibe Coding (Lovable Vulnerability)” (earlier in series)

正直、一度エンジニアは諦めました。新卒で入った開発会社でバケモノみたいに優秀な人たちに囲まれて、「あ、私はこっち側じゃないな」って悟ったんです。その後はカスタマーサクセスに転向して10年。でもCursorとClaude Codeに出会って、全部変わりました。完璧なコードじゃなくていい。自分の仕事を自分で楽にするコードが書ければ、それでいいんですよ。週末はサウナで整いながら次に作るツールのこと考えてます。


