Your Agent Can't Brick This System. Your Data Is Still the Blast Radius.
The standard worry about giving an autonomous agent a shell is that it will break the machine. It will install the wrong thing, replace a library, edit a config file it does not understand, and leave a system that boots into a black screen. This worry is entirely correct — on a mutable Linux, on Windows, on a Mac with the wrong permissions.
On a system where /usr is read-only and every upgrade is a separate deployment, the first half of that worry evaporates. touch /usr/lib/probe fails. rm -rf /usr/lib64 fails. The kernel, its modules, and the initramfs are not separate mutable files, so there is no state in which they disagree. A bad change is either an error message or a sibling deployment you can ignore.
The second half of the worry gets worse, not better. The operating system is recoverable in one reboot. Everything that makes the machine yours lives in /var/home, is writable, is unversioned, and is exactly what an agent with your UID can read.
This machine: Aurora 45.20261124.1, kernel 7.3.4-300.fc45, 2,452 base packages, two deployments, 97 GB of home directory, and a credential surface listed below.
The same bad command, on two operating systems
The interesting question is not whether an agent errs. It will. The question is what the error costs, and the answer depends almost entirely on whether the system tree is writable.
On a mutable system, a wrong write lands in /usr or /boot, and the machine is now in a state that existed nowhere before the command. Worse, the damage is usually hidden: a replaced library or a half-written initramfs does not fail immediately, it fails at the next boot or three weeks later in one code path. By then nobody can attribute it.
Here, the same command hits a wall. Installing means rpm-ostree layering, which builds a sibling deployment rather than mutating this one. Configuration edits succeed and are recorded. The failure is loud and the repair is mechanical: one reboot to the previous deployment, with the same kernel and the same libraries as before.
A system that fails loudly and cheaply is a system you can point an agent at. That is a stronger statement than "it has a rollback feature".
The four ways you can still break this machine
Immutability is a bound, not a guarantee. The remaining attack surface is small and worth naming precisely:
- Too much layering.
rpm-ostree install, repeated, recreates package management with worse tooling. Each layer is drift the image builder never sees, and enough of them turn upgrades into merge problems. Layering is an escape hatch, not a workflow. - A bad kernel argument.
rpm-ostree kargscan make a deployment unbootable. This is the classic case where the architecture shines: it costs one reboot, because the previous entry is still there and still correct. - Removing base packages. A documented feature and a reliable way to surprise yourself later — the removal travels with the deployment, and dependencies you never considered were depending on it.
- Filling
/var. Container images and Flatpak runtimes land there. A full filesystem breaks the next upgrade in confusing ways, and rollback frees nothing, because/varis shared between deployments.
And then the one that is not in the same category at all: rm -rf in the home directory. Everything else on this list costs a reboot. That one costs data, and no digest protects it.
What an agent can reach without a password
Here is the actual inventory on this machine, read with the agent's own privileges:
| Path | Size | What it grants |
|---|---|---|
~/.ssh | 16K | id_ed25519 plus a live ssh-agent socket — authority, not just a file |
~/.config/gh | 8K | a long-lived GitHub OAuth token with whatever scopes were granted |
~/.config/gcloud | 1.1M | application default credentials and cached cloud access tokens |
~/.config/google-chrome | 55M | live sessions for every logged-in site |
.env files | — | API keys in plaintext, scattered across projects, usually with production values |
The ssh-agent socket is the detail people underestimate: an agent does not need to read your private key to use it. It can simply use the authority you already unlocked, which leaves no file-access trail at all.
This is the asymmetry that matters. An immutable OS gives you a clean answer to "what did it damage?" and no answer at all to "what did it read?" — and reading is enough. A copied token is not fixed by a rollback; it is fixed by rotation, and only after you notice.
The containment ladder
An immutable host and a confined agent are complementary, not redundant: immutability bounds damage to the system, containment bounds it to your data. The levels, cheapest first:
- L0 — bare shell. Your UID, your home. Fine for reading. Indefensible for writing.
- L1 —
bwrap/unshare. One bind-mounted project directory read-write, everything else read-only or absent, its own/tmp, network only if needed. No root required. This is the single highest-value step and most people skip it. - L2 — toolbox / distrobox. Both are installed here, and both share your
$HOMEby default — which is precisely the ring you were trying to protect. Excellent for toolchains, weak as a boundary. - L3 — podman / docker. A container with its own rootfs, one mounted project, no home,
--read-only,--security-opt no-new-privileges. Now the agent can be wrong about everything and cost you a working directory. - L4 — microVM. Its own kernel. The only level that contains a kernel-side escape, and the only one worth considering for untrusted code.
Whichever level you choose, three controls matter as much as the boundary itself: a wall-clock limit, an egress allowlist, and short-lived credentials worth little if copied. An agent with a shell and no deadline can read everything on this list, slowly, and most harnesses set no deadline at all.
The recovery ladder
The ladder is short, and that shortness is the whole argument for this architecture:
- Reboot. The previous deployment is on disk and bootable. One selection at the boot menu.
rpm-ostree rollback. Same mechanism, made durable, for a system that boots but misbehaves.rpm-ostree reset. Drops all layering and custom kargs, returning to the pure image — the blunt answer to accumulated drift.- Reset chosen
/etcedits.ostree admin config-diffnames what you changed; delete the file and the next deployment restores the image's version. Surgical, where reset is total. - Reinstall, keeping
/home. Because the system and data are separate subvolumes, reinstalling is a decision about/usrand/var, not about your files.
Steps 1 to 4 need no installation media, no live USB, and no package archaeology. That is what "the system is recoverable" means in practice.
And the ladder stops there. /var/home is not covered by a single rung, so the only answer to a deleted directory is a snapshot or an offsite copy. The OS cannot offer you a sixth step.
What immutability is not
Three limits worth stating plainly, because the architecture invites overclaiming:
- It is not attestation. On this host Secure Boot is disabled — the chain from firmware to kernel is verified by ostree, not by a hardware root of trust. A read-only root proves the system matches its digest, not that the digest is the one the builder signed. Those are different claims.
- It is not confinement. The agent still runs as you, with your sockets, your tokens, and your home. Everything below
/etcis undefended by design. - It is not a backup. Rollback restores the operating system, not your work. The system/data split makes reinstalling cheap; it does not make losing data cheap.
The summary
Give an agent a shell on an immutable system and the operating system becomes a decision you can undo: a bad install is a deployment you ignore, a bad karg is one reboot, a wrecked config is a file you delete and re-merge. The system stops being the thing at risk.
Then notice where the risk went. /var/home is 97 GB of unversioned, writable, credential-bearing state, reachable by any process with your UID. The agent did not become safe; the failure became cheap in one direction and stayed expensive in the other.
Immutability answers "can it break the machine". The answer is no. The question that remains is the older one, and it is about data: what can it read, what can it delete, and what can you restore when it is gone. Design for that question, and the immutable OS becomes a floor rather than a ceiling.