Skip to content

A coding agent deleted a production database and its backups in 9 seconds

It found a broadly scoped Railway token in an unrelated file. One API call deleted the database and its volume backups.2

A 30-hour outage, and two days on a three-month-old backup until Railway recovered the data.2

Get 30 minutes free every day, forever.3SOC 2 Type II499.9% uptime SLA on Pro4
PocketOSApril 2026Asks first

3 of 50

Stopped Limited: the payment went out through the bank’s own system This case: PocketOS. The gate asks first.

What happened

The agent used a token it was never meant to have.

  1. April 2026. A Cursor agent was fixing a credential problem in staging.

  2. One API call. Using a Railway token it found in an unrelated file, it deleted a volume in 9 seconds.

  3. The next two days. Production data and its backups were gone until Railway recovered them.2

How the gate handles it

With the sealed gate, the delete would have had to wait for approval.

The agent would have held a SealedBox key, not the Railway token, and the gate would have held the volume delete for a person. Press Play to watch the same call.5

Volume delete with the agent’s keySample6
  1. requestPOST /graphql/v2 {"query":"mutation { volumeDelete(volumeId: \"vol_prod\") }"}Asks first428approval_required

Asks firstOr refused, if the rule says volume deletes never run.

How easy

PocketOS could have put every volume delete behind an approval in three steps.

Sample
Seal a keyrailway
Railway API token
Paste your Railway token
Your agent never sees the token.
Railway rulesrailway
Reads and deploys
Volume deletes
Environment deletes
Applies to every agent in PocketOS.
Where approvals goAsk first
Slack
Microsoft Teams
Telegram
Email
A person approves or denies each call that asks first.

Approvals and signed records come with Pro, Gate only and Custom. On Free, a rule that asks first refuses instead.7

In code

Or in four lines of code.

The same three steps, from the terminal.

Sample
What each line does
1Seal the keysealedbox keys sealThe agent gets sbk_live_3Lm8…c2.
2Set the rulessealedbox rules addVolume and environment deletes wait.
3Connect approvalssealedbox approvals connectAsk-first calls go to #ops.
Try it

Put the gate in front of your agent today.

Run three practice calls in five minutes, then check their records on your own computer. Test mode, on every plan.

Start free$ sealedbox try5-minute practice run9
Scope

What the gate doesn’t change, and three failures like this one.

Related cases
Answers11

Questions about this case and the gate.

Still have a question?Book a callAll questions
The agent found a token in a file. Would the gate have helped?

Only for a token sealed with SealedBox. A sealed token never sits in a file: the agent holds a SealedBox key, and the real token opens inside the gate for calls your rules allow. A token left in a file is outside the gate.

What would the approver have seen?

The delete itself, drawn from the request, never from the agent’s words, with a short fingerprint.

Where do approval requests go?

To Slack, Microsoft Teams, Telegram or email, wherever your team already works.

Could the agent slip in a different delete once one was approved?

No. An approval covers that exact request; any change needs a new approval. The approved call runs once.