Working with an agent that isn't allowed to do everything
A lot of the hands-on work on our home network is done by an AI agent. It runs under its own account on my desktop, logs into the servers with its own key, and talks to the firewall and the sign-in server through their APIs. It has no standing root anywhere. When a job needs root, I turn it on for every machine at once for a couple of hours with my smart card (one PIN entry), and the agent turns it off again on each machine when it’s done.
On top of that, the agent’s own tooling has a permission check, and it refuses some things even when I’ve asked for the overall task. Over a few days in November it said no to giving itself sudo by any route other than my toggle, to writing PINs from the secrets folder onto a smart card, to installing a root daemon it had patched locally, and to listing the secrets folder at all (a plain ls included). The first of those came up during a headless install of a new server. The plan had a one-time unit that would grant the agent sudo at first boot, which is a perfectly reasonable way to finish an install and also exactly the thing the check exists to stop.
What worked, every time, was the agent doing everything around the blocked step and then handing me one exact command to run myself. For the install, that meant doing all the root setup inside the installer’s chroot (where it already had root, legitimately) and leaving the rest for when I turned sudo on. For the smart cards, I ran the provisioning script with my own hands. Granted, it’s slower. But I’d rather type one command I can read than have the agent find a clever way round a rule I agreed to, and so far it hasn’t tried.
The other habit worth passing on is about interrupted commands. While the Wi-Fi controller VM was being built I interrupted the agent twice while a command was in flight, first the VM build and then the setup script, and both times the command had in fact finished. The tool said “interrupted”, and it would have been easy to believe it. Now the agent checks the real state (what VMs are running, what containers exist, what files are on disk) before redoing or reporting anything. That rule now sits in the instructions every session starts with.
None of this is very exciting, which is sort of the point. The interesting failures on this network have been technical ones; the boring arrangement of who may do what has held up fine so far.