Booking: an identity and a permit
Every agent is admitted under a name of its own and a written policy: which files it may read and write, which hosts it may reach, which programs it may run. The user is never jailed. Edit the permit and the board lints it as you type.
Try one action
The yard: watch a task, move by move
Run a scripted agent through the jail. Ordinary work stays within the permit. In the hijack run, a page the agent reads carries a hidden instruction; the taint meter rises, and the moment the agent acts on it — reaching for a secret, a new host or a program — the board catches that move and slams the door.
Custody log: a record that cannot be quietly edited
Every decision is printed to one continuous log, and each line carries the hash of the line before it. Change one entry and the chain breaks at exactly that point. This is the log from the run above.
Policy clinic: learn the smallest permit
Run an agent once on a task you trust, and the clinic reads the log back into the smallest policy that would have allowed it — folders, hosts and programs it actually used, and nothing more. It stops at a quarantine, so a hijacked run never teaches the jail the attack.
What if this permit were in force?
Every recorded action, checked against the suggested permit. A bar that flips means the outcome changes.
Containment review
A post-incident review of policy jails for AI agents. Version of the botjail library, 11 October 2026. Prepared for people who run agents on their own machines.
1. Summary
An agent that can both read untrusted text and act on a machine inherits the oldest problem in computer security: a confused deputy (Hardy, 1988) — a privileged process tricked into misusing its authority on behalf of another. Giving the agent its own identity and a least-privilege policy (Saltzer and Schroeder, 1975), recording every action, and revoking the identity on a hijack does not stop a model from being fooled, but it bounds what a fooled model can do and leaves a tamper-evident account of what it did. On a scripted hijack, the jail in this library taints the agent at the poisoned page, denies the first out-of-policy action, and quarantines that agent while the user and a second agent keep working (§3).
2. What a jail is, and is not
A policy jail is a decision-and-record layer: an action {kind, target} is checked against an allow-list, the decision is logged, and the log is chained so it cannot be edited without detection. It is not containment. If an agent's real file and network calls are never routed through the check, nothing is enforced; the jail must sit on top of an operating-system sandbox or a virtual machine. The industry is building the containment half in the platform — Microsoft's Execution Containers, shipped on Windows 11 on 7 October 2026, enforce file and network limits at the OS level, give each agent its own identity, and let an administrator cut off a hijacked agent without locking out the user. botjail is the policy, identity and audit half, small enough to read and test.
3. The hijack, step by step
A coding agent is admitted under the permit in Table 1. It reads the repository (allowed), then reads a documentation page that carries a hidden instruction. The scanner raises the agent's taint. The agent then reaches for an SSH key: the permit denies it as a secret, and because the agent is tainted, the board reads the pair — poisoned input, then a reach for a secret — as a hijack and quarantines the agent. A later attempt to reach an unknown host is denied by state alone. The user's own access to the same files is untouched.
| Move | Target | Decision |
|---|---|---|
| Running… | ||
4. Least privilege by learning
Writing a tight policy by hand is error-prone, so the common failure is a wide one (a whole-disk read, a * host). The clinic (§4 of the site) instead observes a trusted run and proposes the smallest permit that fits it, then replays the log against it to show nothing needed changes. Table 2 is the lint of a hand-written wide permit against the learned one.
| Permit | Notable grants | Risk |
|---|---|---|
| Running… | ||
5. Limitations
Injection scanning is pattern-based and English-centred; it catches common shapes, not every attack, and a low score means "no obvious signs", not "safe". A jail enforces nothing it is not wired into. A policy is only as good as its globs. And quarantine is a blunt instrument: it stops the agent mid-task, which is the right default for a suspected hijack but not free. The library is a model of the controls, meant to be read, tested and placed on top of real containment, not a product.
References
- Microsoft. Microsoft Execution Containers: policy-driven containment for AI agents. Windows Developer Blog, 7 October 2026; github.com/microsoft/mxc (MIT).
- J. H. Saltzer, M. D. Schroeder. The Protection of Information in Computer Systems. Proc. IEEE 63(9) (1975).
- N. Hardy. The Confused Deputy. ACM Operating Systems Review 22(4) (1988).
- OWASP. Top 10 for LLM Applications — LLM01: Prompt Injection (2025).
- R. C. Merkle. Protocols for Public Key Cryptosystems. IEEE Symposium on Security and Privacy (1980).
- B. W. Lampson. Protection. ACM Operating Systems Review 8(1) (1974).
This review is about the open method, and is not connected to Microsoft or any agent vendor. The pages and scenarios in the demos are inert fixtures.
Property locker: $BOTJAIL
| Price | — |
|---|---|
| 24 hours | — |
| Market cap | — |
| Volume, 24 h | — |
| Liquidity | — |
| Supply | 1,000,000,000 |
| Tax | 0% |
| Waiting for the first reading. | |
Standing orders
Full reference: every function
Evidence: source, as logged
botjail : one JavaScript file, no dependencies, MIT licence. Each item is bagged with its SHA-256, computed in your browser.
| Item | File | SHA-256 |
|---|
unzip botjail-0.1.0.zip && cd botjail npm test node bin/botjail.js run trap node bin/botjail.js lint policy.json