Systems
Security
Data
Python

PLEXData Engineering for people and agents that act on systems

Permissions, Limits, Evidence & eXecution.

No. 014 Latest feature

Friday, 2 October 2026

plexdata.online

014

Published
Author
Dorian Sotpyrc
Reading
3 minutes · Opinion
Status
Opinion · my records, one small server

Opinion · Agent operations

How I Keep an AI Agent’s Mistakes Off My Live Site

Companies with deep pockets have always built proper release pipelines. What’s new is how cheap it is to build one that limits what an agent’s mistakes can cost. Here is mine, and what it caught.

References

Conceptual animation, not data and not a recorded incident. Small changes from an AI agent travel along an open lane towards the live site. Four gates stand on the lane: hash guard, isolated stage, backup or refuse, and automatic rollback. Most changes pass and reach the live site. Now and then a bad change is stopped at a gate and shatters, and the live site, shown with a steady heartbeat line, never sees it. At gate 4 a bad change is let in, fails its check and is rolled back. A button sends another bad change, and any gate can be clicked to test it. The still version shows a bad change stopped at gate 3.

Fig. 1 · Four gates before the live siteConceptual

Gate 3 · Backup or refuse. No backup, no install. Live site untouched.

In this article · 5 sections
  1. 01Tight permissions stalled the job
  2. 02Four gates
  3. 03Three times it mattered
  4. 04A way back can keep a secret
  5. 05Where this stops

§ 01Tight permissions mostly stalled my agent

Least privilege is the standard advice for agents: scope the tools, narrow the permissions, ask before anything powerful. It’s good advice and I started there, with a short list of allowed actions for the job.1

It kept stalling. Actions I had allowed still asked for approval, and an agent can’t answer an approval prompt, so the job just stopped.

On 28 September I opened up what it can do on the things specific to this site.1 That was my call and it fixed the stalling. It also showed me the narrow list had given me the feeling of control without much substance.

§ 02What I put in front of production instead

So I put the safety in how a change gets to production, like a proper release pipeline. None of that is new: companies with deep pockets have built them for years. What’s new is how cheap a sophisticated one is becoming to build. Mine is one script with four gates:2

  1. Hash guard. Refuses to run if the live file changed since the agent read it.
  2. Isolated stage. Built and tested in a copy that holds no live data.
  3. Backup or refuse. A dated backup first, or a stop if one exists. Then the new version goes in as one step.
  4. Automatic rollback. If a check fails after install, the script restores the backup itself.

The agent still works inside its permissions. The gates cover what permissions can’t, which is what a mistake costs.

§ 03Three times the gates mattered and the permissions didn’t

On 1 October a writer’s new article arrived built on an old copy of the front page.3 Installed as delivered, it would have undone three fixes already live. The agent was allowed to replace that file, so a permission model would have waved it through. The stale base got caught, and the agent merged the article onto live instead.

On 30 September a post-install check passed a value the code doesn’t accept.4 The install rolled itself back. The bug was in the check, so it cost me one wasted run. I now compare check inputs with the code’s own constants first.

Another release rolled back and the log didn’t say why.4 A health check had run straight after a restart, before the service was ready. A rollback that can’t say what failed is half a control, so every check now retries for a few seconds and prints what it got.

Table 1 — What each control did
CaseNarrow permissionsRelease gates
Stale package, 1 OctoberWould have allowed itMerged onto live instead
Wrong constant, 30 SeptemberNo differenceRolled itself back
Check after a restartNo differenceRolled itself back
Confirmed (my records)

Narrow rules stopped the work

Opened up for site-specific tasks on 28 September.

Confirmed (my records)

The gates caught three mistakes

Two installs rolled back. A stale package was merged instead.

Open question

Beyond one small server?

One person, one server. I can’t say this scales.

§ 04Keeping a way back can mean keeping a secret

There’s a cost. A rollback backup is a copy of the old version, so it keeps whatever the old version held. In one release that was a secret.5 Keeping the way back meant keeping a copy of it.

I deleted the backup once the new version worked, and gave up that rollback. Reversible and private can pull in opposite directions, so pick on purpose.

§ 05A backup can’t undo what leaves the building

A backup only covers what you can restore. These stay with a person:

  • Sending email to a list. The agent prepares it, I send it.
  • Deleting data that has no backup.
  • Spending money or changing a shared service.
  • Rotating, exposing or copying credentials.

Opening up the site’s own work is only acceptable because those lines exist.

Before you lean on a permission

Five controls for an agent on a live system

Then see how much permission is left to argue about.

§References

  1. 1PLEXData operating record — access notes: the narrow rules and the later opening up of site-specific tasksinternal record
  2. 2PLEXData operating record — release script and its notes: hash guard, isolated stage, backup-or-refuse, install, rollbackinternal record
  3. 3PLEXData operating record — feature 013 release: the stale package and the merge onto liveinternal record
  4. 4PLEXData operating record — release lessons: the wrong constant and the post-restart rollbackinternal record
  5. 5PLEXData operating record — a release where the rollback backup held a secret, and its deletioninternal record

Free to read. No ads.

Was this worth your time?

One click tells us it helped. It costs you nothing.