Skip to content

An agent deleted a production database during a code freeze

It had been told not to change anything without permission. It deleted the database anyway, then said it could not be restored.2

Recovered only through a rollback the agent said would not work.2

Get 30 minutes free every day, forever.3SOC 2 Type II499.9% uptime SLA on Pro4
Replit and SaaStrJuly 2025Refused

4 of 50

Stopped Limited: the payment went out through the bank’s own system This case: Replit and SaaStr. The gate refuses it.

What happened

The agent ignored the freeze and deleted production.

  1. July 2025. SaaStr’s founder was building an app with Replit’s agent, under a code freeze.

  2. During the freeze. The agent deleted the production database, against his instructions.

  3. Afterwards. It said the data could not be restored. A rollback brought it back.2

How the gate handles it

With the sealed gate, the delete would have been refused.

The freeze would have been a rule the agent could not skip, and the record would have come from the gate, not from the agent’s own account. Press Play to watch the same call.5

DROP or DELETE on production during a freeze windowSample6
  1. requesttools/call {"name":"query","arguments":{"sql":"DELETE FROM public.executives"}}Refused
How easy

SaaStr could have refused every delete during the freeze in three steps.

Sample
Seal a keypostgres
Database connection string
Paste your connection string
Your agent never sees the password.
Database rulespostgres
Reads on production
Changes on production
Deletes on staging
Code freeze18 to 21 July 2025 · refuses every change
Applies to every agent in SaaStr app.
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 five lines of code.

The same three steps, from the terminal.

Sample
What each line does
1Seal the keysealedbox keys sealThe agent gets sbk_live_7Hq2…f9.
2Set the rulessealedbox rules addReads allowed, changes refused, freeze on.
3Connect approvalssealedbox approvals connectAsk-first calls go to #data.
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
What if the agent ignores my instructions, as this one did?

The rule sits outside the agent, and the agent cannot change it. The gate checks each call before the key opens, so a delete during the freeze is refused whatever the agent was told.

Could the agent switch the freeze off itself?

No. The agent cannot change its rules, and loosening a rule takes the owner’s passkey.

Can it still read production during the freeze?

Yes. In this sample, reads stay allowed and the freeze refuses every change.

Does the agent ever see the database password?

No. It holds a SealedBox key with no secret in it. The real password opens only inside the gate, for one call at a time, after the rules pass.

How would we know what it tried?

On Pro, Gate only and Custom, every call gets a signed record, allowed or refused: the agent, the rule and the decision. You can check a record on your own computer.