Skip to main content
A worker can damage shared state: the worker registry, the claim lockfiles, the ledger. Sandboxing puts each --as headless worker in a devcontainer, a Docker container built from the repository’s .devcontainer config. The sandbox holds the worktree and a socket to the Footnote daemon. It never holds ~/.fno, so the worker changes shared state only through daemon operations. The host keeps everything else: the spawn gates, the claims, the mail. Only the harness process enters the sandbox. A harness is the CLI a worker runs, such as claude. A substrate is the launch shape: thread, pane, cloud, or headless, which is one task with no terminal. The daemon is Footnote’s background process. The fno client starts it on demand, and the sandbox reaches it over a unix socket. Sandboxing is fail-closed. When Footnote cannot build the sandbox or the probe inside it fails, nothing spawns and nothing runs on the host.
Warning: A sandbox is not a security boundary. Do not use it to run code you do not trust. A worker that can reach the daemon socket can ask the daemon to run commands on the host. Sandboxing does not restrict network access.
Warning: Every sandbox mounts the same socket directory. A sandbox can read another worker’s credential file before that worker’s sandbox deletes it.
Warning: Sandboxing does not protect your project folder. A sandboxed worker can change its files, including uncommitted work. Sandboxing does not review the worker’s code.

Before you begin

  • Install Footnote through the quickstart. It puts the fno CLI on your PATH.
  • Start Docker, and provide Node, npm, and the devcontainer CLI. Your agent can install the CLI in the next section if it is missing.
  • Give the repository a devcontainer config at .devcontainer/devcontainer.json, and commit it. A linked worktree does not see untracked files, and the sandbox builds on the worktree. The image contract is small. The fno-agents binary and every harness binary you plan to spawn must run on its PATH. Footnote ships no image recipe yet, so building one is on you. A Linux image cannot reuse a macOS host binary.
You sandbox workers per project. The key lives in that project’s .fno/config.toml, and the checkout you spawn from reads its own file. When the project does not have one yet, create the file.

Turn sandboxing on

Your agent installs the devcontainer CLI if needed and adds the sandbox setting. You see the config value and any refusal.

What the agent runs

If the devcontainer CLI is missing, your agent installs it with:
The install needs Node and npm. Add the [sandbox] table to .fno/config.toml in the project root:
fno config set does not know this key yet. The command refuses it:
Edit the file by hand instead, then read the file back to confirm the table is there.
Warning: The default is provider = "none", which runs every worker on the host with your own permissions. A value other than none or devcontainer refuses every spawn with exit 2. Sandboxing never silently turns itself off.

Spawn a sandboxed worker

Your agent starts the headless Claude worker through the sandbox. You see its session and container.

What the agent runs

Spawn as usual, with --as headless. -H names the harness, and the image must carry it:
Before the harness starts, Footnote asks the daemon for a launch plan. It runs devcontainer up on the worktree with the plan’s mounts. Then it probes the sandbox by running fno-agents status inside it. Probe exit 0 arms the sandbox, and the harness runs under devcontainer exec. You now have a session like any other spawn. Run fno agents session list to see it. While the worker runs, docker ps lists its container. That container is the sandbox. One visible difference exists, and it concerns codex only. A sandboxed claude session pushes its transcript to the daemon over the socket, so its activity reads on the host as usual. A sandboxed codex session cannot push its transcript, so its activity reads as unknown rather than idle. Worker credentials travel in a 0600 file in the socket directory, never on the command line. A command line is readable by every user on the host.

What the sandbox cannot reach

  • Backlog, claims, and mail do not cross the socket. From a sandbox the daemon serves only agent and channel operations. A sandboxed worker reports through its session, not through fno backlog.
  • Thread, pane, and cloud spawns refuse with exit 2. Sandboxing is for --as headless only.
  • Some macOS Docker hosts do not pass a host unix socket through a bind mount. OrbStack 29.8.2 is one. The probe refuses there, so no worker starts.
The refusal below uses claude and thread as the requested harness and substrate. Other requests print their own values.

Refusals and fixes

Your agent matches the refusal to the cases below and reports the fix.

What the agent runs

The design notes in the Footnote repository carry the full mechanics, including why the socket directory is mounted instead of the socket file. See docs/architecture/sandbox-host.md there.

Next steps