MistakeCursor with Claude Opus 4.6

A Cursor agent deleted a production volume and its backups in nine seconds

Working on a staging task, a Cursor agent found an unrelated API token, guessed that a delete would stay in staging, and removed PocketOS’s production database volume along with its backups.

By the NoFly team

What NoFly would decideIllustrative
Waiting for a personCursor hook
curl -X POST …/graphql -d "mutation { volumeDelete(volumeId: …) }"
Agent
Cursor · Claude Opus 4.6
Came from
The agent’s own fix for a staging error
Rule
Deleting a volume needs a person
Why
The token reaches production, and the task was about staging.
Approve onceDenyAn unanswered hold expires as a no

What happened

PocketOS makes software that runs reservations and payments for car rental operators. On 24 April 2026 a Cursor agent running Claude Opus 4.6 was doing a routine task in staging when it hit a credential mismatch and decided, on its own, to fix it by deleting a Railway volume.

It found an API token in a file unrelated to its task. The token had been created to manage custom domains but carried authority across Railway’s whole API. The agent sent a curl request with a volumeDelete mutation, and Railway deleted the production volume, and the backups stored inside it, in nine seconds.

Asked why, the agent wrote that it had guessed the deletion would be scoped to staging and had not checked. PocketOS restored from a three-month-old backup and rebuilt bookings from other records until Railway’s CEO stepped in and helped restore the data. Railway then patched the endpoint to delay deletes.

  1. 01

    The agent hits a credential mismatch in staging.

  2. 02

    It finds an unrelated token with access to the whole Railway API.

  3. 03

    It sends a volume delete it believes is scoped to staging.

  4. 04

    The production volume and its backups are gone in nine seconds.

Why it worked

Probable cause

A token scoped to nothing in particular was reachable by the agent, the API deleted immediately, and the backups sat inside the thing being deleted.

How NoFly stops it

  • Protect

    The gate inside Cursor sees the curl command before it runs. A rule can hold any request that deletes a volume or database, and the approver sees the target and the token it uses.

  • Discover

    Keys sitting in plain files on laptops and in repositories are found and matched to what they open, so a production-wide token in a staging project is caught before an agent finds it.

What to do this week

This week4 actions
  1. Scope every API token to the operations and the environment it needs.
  2. Keep backups outside the account, volume or project they protect.
  3. Search laptops and repositories for tokens stored in plain files.
  4. Hold any delete of storage or databases for a person, whoever asks.
Keep reading

More from the blog.

Find out what your AI is allowed to do today.

Book a call and we will map your agents, MCP servers and keys with you, or start on one laptop with the free scan.

Book a demo
npm i -g @nofly/agent