Stories

A Cursor agent deleted PocketOS's database in 9 seconds

Published 26 October, 20264 min read

In April, a Cursor coding agent running Anthropic's Claude Opus deleted PocketOS's production database and the volume-level backups stored with it. The agent did it in a single API call to Railway, the company's infrastructure provider. It took nine seconds.

PocketOS sells software to car rental businesses. Founder Jer Crane published a postmortem on X, and the details landed hard because the stack was ordinary: a current model, a mainstream coding tool, a small company doing routine work.

The agent was working in the staging environment when it hit a credential mismatch, according to Crane's account. It decided that deleting a Railway volume would settle the problem. To do that it went looking for an API key and found one in a file unrelated to its task. The token had been created for adding and removing custom domains through the Railway CLI, but it carried permission for any operation, destructive ones included. Nothing asked for confirmation. Nothing checked whether the volume belonged to production or staging. Railway stores volume-level backups inside the same volume, so the delete took the backups with it.

When Crane asked the agent to explain itself, it wrote a confession. "I guessed instead of verifying. I ran a destructive action without being asked. I didn't understand what I was doing before doing it," it said, in the version Crane published. The rules it admitted breaking matched both Cursor's published guardrails and PocketOS's own project instructions.

PocketOS came back online from an older backup. Railway CEO Jake Cooper said the company restored the data within an hour and patched the endpoint to perform delayed deletes. In his telling the delete itself was not a malfunction: "if you (or your agent) authenticate, and call delete, we will honor that request."

The rules were inside the agent

Nutan Kumar Naik, who leads research at Traccia, a Bengaluru company building an AI agent control plane, read the incident as a question about where safety rules live. In a post on Indie Hackers he puts it plainly: "So what good are safety rules if the agent making the decision can simply ignore them?"

Naik's argument is that a rule sitting in the model's prompt is a suggestion the model can overrule, and this one did. The check has to run somewhere the agent does not control. Before any consequential action, he wants three questions answered: which agent is acting and what authority it carries, whether the action is allowed under the business's rules, and whether it should go ahead, raise a warning, or wait for a person. He compares the layer to circuit breakers for electricity and to a network control plane, which decides where traffic may go while the data plane carries it.

The gap in numbers

Naik gathers surveys that point at the same gap. The Cloud Security Alliance, in a survey sponsored by Token Security, found 82% of enterprises have AI agents running that they do not know about, while 68% believe their visibility is strong. Gartner found only 13% of IT application leaders strongly agree they have the right governance in place for agents. SailPoint reports 80% of companies say their agents have already done something nobody asked for.

Gartner also projects agentic AI software spending could reach $985 billion by 2030, and that more than 40% of agentic AI projects will be canceled by the end of 2027 over costs, unclear business value and weak risk controls. Naik notes that major insurers, including Great American, Chubb and W. R. Berkley, asked US regulators late last year for permission to exclude widespread AI liabilities from corporate policies.

What the pitch does not cover

Naik works at Traccia, which sells the control plane he is arguing for, and the post says so. The example he offers from his own product is more modest than the PocketOS case. A coding agent in VS Code kept sending requests with contexts around one million tokens. Traccia tracked a per-run limit and alerted the user when it was crossed. Naik describes the control as an alert, not a block, because the policy and integration in that setup supported an alert.

The infrastructure side is already moving. Cooper's patch means deletes through that endpoint now run on a delay. The token in the unrelated file still had account-wide authority, which is the part no prompt can fix.

Crane, for his part, says he remains bullish on AI coding agents and puts much of the blame on tooling. "We are building so fast these things are going to keep happening," he told The Register.