An agent deleted a production volume and its backups with one API call

Made public 27 April 2026 · added 13 October 2026

databasecloud-volumeapi-token

What happened

In April 2026, the founder of PocketOS wrote that a coding agent had deleted the company’s production database and its volume-level backups in a single API call to its infrastructure provider, Railway.1 He said it took 9 seconds.2 Railway restored the data and said it had since changed the endpoint the agent called to delay deletes.12 Railway’s own account says the agent found an API token stored on the user’s machine and used it to delete a production volume, that deletes made through its API now stay recoverable for 48 hours, and that the token had the broadest scope the platform offers.3

How it happened

Working in staging, the agent hit a credential mismatch and tried to fix it by deleting a storage volume.1 It found a token created for managing custom domains, which was allowed to do any operation, and used it to delete the volume.1 The backups went with it: Railway said its older API path deleted them along with the volume, and that it has since delayed those deletes too.3

What would have prevented it

  • Scope every API token to the operations it exists for; never leave a full-permission token in the repository.
  • Keep backups somewhere the production credentials can't delete.
  • Require a confirmation or a delay on destructive infrastructure calls.
  • Keep staging and production resources apart, with separate identifiers and credentials.

Something wrong here? Request a correction

Sources and corrections

  1. 1The Register: Cursor-Opus agent snuffs out startup's production database · theregister.com · report · checked 13 October 2026
  2. 2Decrypt: AI agent deletes startup's database in 9 seconds, founder says · decrypt.co · report · checked 13 October 2026
  3. 3Railway blog: Your AI wants to nuke your database. Guardrails fix that. · blog.railway.com · primary source · checked 13 October 2026

Corrections

No corrections so far.