- ~100hook modules served by one binary
- 11lifecycle events where policy runs
- 63shell hooks it replaced, ported with tests
Rules moved out of the prompt and into the runtime
In AgentOS I found that long agent runs fail because the agent is asked to remember the rules along with everything else. I moved the rules out of the agent and into code that runs inside its runtime, in the hook points the agent cannot route around. The coding tools I govern expose lifecycle hooks, before a tool call, after one, at session start, when the agent tries to stop. One Rust binary serves all of them. The diagnosis is in Why long agent runs fail.
A publisher writes the hook configuration into each agent environment and checks it byte for byte, so the rules that run are the rules I wrote.
What the hooks enforce
The effects are what matter.
A refusal can only point to a command that exists for that agent in its current state, and it names who may take it, so an agent that hits a wall learns its next correct move. I reworked every refusal path to get that property. Overrides exist, because a system with no override gets bypassed.
I turn an operating procedure into enforcement an autonomous agent cannot ignore, and I phrase each refusal so it teaches the next correct step.
Incidents become machine checks
The approach reaches the build too: an incident becomes a permanent machine check, so the same mistake is caught by the build from then on.
The hook points belong to the vendors' coding tools; the policy engine and its rules are mine.