skip to content
FILESYSTEM.md

Sandboxing Agent Filesystems

Last updated:

View Markdown source

Builder procedure

Goal

Assume the model will try creative paths. Enforce boundaries in the runtime, not only in prompts.

Layers of isolation

  1. Path jail — all FS tools resolve under an allowed root
  2. Process sandbox — bash/tools run in a container/VM/microVM/sandbox product
  3. Network policy — default deny or allowlist
  4. Secret boundary — credentials never mounted into agent-visible trees
  5. Resetability — ephemeral workspaces can be wiped between tasks

Path jail (MUST)

root = /sandbox/workspace
input: ../../etc/passwd → reject
input: /etc/passwd → reject unless explicitly allowed
input: PROJECTS/a.md → /sandbox/workspace/PROJECTS/a.md

Implement once; call from every tool.

Bash / shell (SHOULD)

If you expose bash:

Ephemeral vs durable mounts (SHOULD)

MountLifetimeExamples
Ephemeral workspaceper task/sessionscratch drafts
Durable projectper repoFILESYSTEM.md, AGENTS.md, PROJECTS/
Durable memorylong-livedMEMORY/, remote docs

Document this split in FILESYSTEM.md so agents know what survives reset.

Failure modes to test

Checklist

Human notes

Sandboxing is where “filesystem for agents” becomes production-ready. Pair this page with Agent Safety (policy for agents) and Infrastructure (OS/cloud primitives).