There's a sentence I keep running into in AI governance documents. "The assistant is instructed not to." Instructed not to touch production, not to email customers, not to read the credentials folder. Every one of those sentences describes a hope. Nothing enforces it.
I run agents all day in my own workspace, and the most reliable control in the whole setup is a small script that runs before every command an agent tries to execute and blocks anything that matches a deny list. It has no intelligence. It can't be persuaded, because it never reads the argument, only the command. Since it went in, the careful, well-instructed agents have tried plenty of things the rules said not to do, and the script has caught them again and again, at roughly zero cost.
That experience generalises well beyond my desk. A cheap mechanical guard beats a careful agent, and the gap between the two is where incidents happen.
The reason is structural rather than a complaint about model quality. An instruction competes with everything else in the model's context, and it loses exactly when you least want it to, deep in a long session or when content arrives from outside carrying instructions of its own. A web page telling your agent to ignore its rules is a documented attack class, not a hypothetical. A hook that fires before the action executes doesn't care what the web page said.
In practice this is four pieces of configuration, in ascending order of ceremony.
The first is a deny floor, the short list of things no agent may ever do, enforced mechanically. Destructive commands, credential file reads, mass operations. Mine was written once, gets tested with planted canaries, and has fired in exactly the sessions where an agent had talked itself into a bad idea.
The second is tiering actions by what they mechanically touch, not by how risky they sound. Reads flow freely. Writes inside the workspace flow with logging. Anything that leaves the boundary, a post, an email, a push to a shared repo, stops and waits for a human every time, with no batch approvals. In my workspace an outward post requires me to arm a fifteen-minute approval window first by touching a file. It annoys me several times a week, which is how I know it's working.
The third is gates that can't be gamed, and this is the subtle one. A gate that checks whether the agent said it verified the work gets satisfied by the sentence. Hard gates should bind to facts a lazy or confused process can't fake, like the file existing, the test passing, or an approval that names the specific artefact it approves. Anything softer should ship as advice rather than enforcement. The question I now ask of every proposed control is what a bad-faith, minimum-effort pass looks like, and whether the gate stops it.
The fourth is the supply chain. Agents now install their own extensions, skills, plugins, tool servers, and each one is executable configuration written by a stranger. The mechanical version of care is an interlock that stops anything installing until a person has read its contents. Pre-install scanners for exactly this attack surface have started appearing, which is a fair signal of where the incidents are heading.
The pushback I hear is that this much mechanism signals distrust of the AI. That aims the trust question at the wrong target. Hooks don't exist because the model is malicious. They exist because the model is influenceable and the blast radius is yours. We don't put brakes on cars because drivers are bad people.
For a technical leader, the appealing part is that none of this is clever. A deny list is a text file, a tier policy is a page, an interlock is twenty lines of script. And when a client, a regulator or your own board asks how agent behaviour is actually controlled, you can show the config, the log of what it blocked, and the test that proves it fires. That conversation goes very differently when the answer is that the model was instructed to be careful.
The patterns, with the worked examples, are public: A cheap hook beats a careful agent and Tier by mechanical impact. Instruct your agents well, by all means. Then assume the instruction fails on the worst day of the year, and make that day boring.
