BOTJAIL CONTAINMENT BOARD build 1.0

Jail the agent,
not the user.

An AI agent that reads the web and touches your disk is one poisoned page away from working against you. botjail gives every agent its own identity and a written policy, records every move, and cuts off a hijacked one — while you keep working.

botjail decides and records. It is the policy, the identity and the flight recorder — pair it with real containment.

agent:coder#1ACTIVE
taint
0.00
    a scripted task, checked move by move
    01

    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.

    CONDITIONS OF RELEASE
    Desktop

    Try one action

    02

    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.

      03

      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.

      —
        04

        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.

        05

        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.

        Table 1. The permit, and what each move in the hijack run does. Computed on this page.
        MoveTargetDecision
        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.

        Table 2. A wide hand-written permit versus the learned one, by the library's lint. Computed on this page.
        PermitNotable grantsRisk
        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

        1. Microsoft. Microsoft Execution Containers: policy-driven containment for AI agents. Windows Developer Blog, 7 October 2026; github.com/microsoft/mxc (MIT).
        2. J. H. Saltzer, M. D. Schroeder. The Protection of Information in Computer Systems. Proc. IEEE 63(9) (1975).
        3. N. Hardy. The Confused Deputy. ACM Operating Systems Review 22(4) (1988).
        4. OWASP. Top 10 for LLM Applications — LLM01: Prompt Injection (2025).
        5. R. C. Merkle. Protocols for Public Key Cryptosystems. IEEE Symposium on Security and Privacy (1980).
        6. 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.

        06

        Property locker: $BOTJAIL

        PROPERTY BAG No. 1.0
        Contract address
        LIVE FEED · one-second candles full screen
        Connecting the feed…
        MANIFEST · read live
        Price—
        24 hours—
        Market cap—
        Volume, 24 h—
        Liquidity—
        Supply1,000,000,000
        Tax0%
        Waiting for the first reading.
        07

        Standing orders

          Full reference: every function
          08

          Evidence: source, as logged

          botjail : one JavaScript file, no dependencies, MIT licence. Each item is bagged with its SHA-256, computed in your browser.

          ItemFileSHA-256
          unzip botjail-0.1.0.zip && cd botjail
          npm test
          node bin/botjail.js run trap
          node bin/botjail.js lint policy.json