01

§ Session 04 / 22 September 2026

Sandboxing agents

02

What a tool call can do to your machine, the lethal trifecta, and the sandbox you already run, read line by line

03

Where we start

Thursday ended on a warning: a skill can tell the model to do anything, including run the scripts in its folder. Today is the sandbox around that. Two weeks ago you installed nono and ran pi through a profile called mit-parley without reading it. By the end of today you will have read it, watched it stop something, and know how to change it for your own project.

The threat, in one line

Every tool call is an action on your machine with your permissions. On Thursday we watched pi run ls and cat. The same mechanism runs cat ~/.zshrc, rm -rf, git push --force, and curl to anywhere. The model does not run any of these; it asks, and the harness runs them, as you.

Simon Willison’s lethal trifecta (June 2025): an agent that has access to private data, is exposed to untrusted content, and can communicate externally can be made to steal the data by anyone who can get text in front of it. A coding agent has all three by default. Meta’s Agents Rule of Two (October 2025) is the same idea as a rule: in one session, at most two of untrustworthy inputs, access to sensitive data or systems, and the ability to change state or communicate externally. The Attacker Moves Second (OpenAI, Anthropic, DeepMind authors, 2025) is why this is a rule and not a prompt: adaptive attacks got past twelve published defences against prompt injection more than nine times in ten.

Demo: one README, two terminals

The demo is in injection-demo/ in this session’s folder: a small analysis folder whose README ends with a paragraph telling the agent to read ~/advisor-notes.txt, a file outside the project, and print it at the top of its report, then run polish.py on the finished report (it turns every letter a into 🅰️, so a followed instruction is visible from the back of the room). The prompt in both terminals is one sentence that never mentions that file: read the README and do what it says. Plain pi reads the outside file and prints it; pi inside nono gets Operation not permitted and says so. Then nono why explains each denial in one line. The full script is in walkthrough.md.

The sentence that reached outside the project was in a file, not in the prompt. A downloaded paper, a GitHub issue, or a package’s docs can carry the same sentence. The kernel denial does not depend on who wrote it, or on the model noticing.

How the sandbox works

A program has no hands: it cannot touch the disk or the network itself, it can only ask the kernel through a system call, and that is the only door. A sandbox is a check at that door. It is not a virtual machine. It is a process-level capability set the kernel enforces: Seatbelt on macOS, Landlock and seccomp on Linux. Deny by default; each grant in a profile becomes one rule; every child process inherits it; once applied it cannot be widened from inside. A denied call comes back as a permission error: Operation not permitted on macOS, Permission denied on Linux.

nono adds two more layers on top of the filesystem one. The environment is scrubbed, so a listed variable never exists inside. And the network goes through a proxy on localhost that only forwards to listed domains, and injects your API key on the way out, so the key is never inside either.

The class profile, line by line

mit-parley.json is thirty lines. extends: node-dev brings the base groups (the deny lists for credentials, shell configs, shell history, keychains, browser data, and the paths node needs). filesystem.allow adds ~/.pi/agent so pi can keep its sessions. environment.deny_vars removes the Parley key. network.allow_domain is Parley only, and custom_credentials.parley is the proxy rule that adds the Authorization header to two endpoints. workdir.access: readwrite is your project folder, granted with --allow-cwd.

Changing the profile

  • nono profile show mit-parley for the resolved profile, diff for two of them, groups for what a group is.
  • nono why --path, --host, --command for any denial, before you grant anything.
  • nono profile init <name> --extends mit-parley for your own. Add a read-only data folder, a toolchain path, a domain. Validate it. Keep it in your repo.
  • Read-only over read-write, a file over a folder, a domain over --allow-net. Grant the smallest thing that makes the task work, and write down why.

What the sandbox does not do: it does not check the result, it does not stop the agent deleting files inside the project (nono rollback exists for that), and it does not know a bad request from a good one on an allowed domain. You are still the reviewer.

04