Sandbox

The sandbox is a development guardrail, not a hypervisor. Untrusted autonomy should use stronger isolation (container / remote tiers when those adapters are fully wired).

ModeIsolationWhen to use
worktreeDefault. Git worktree under .zox/worktrees/<sessionId>Daily interactive coding; keep main tree clean
hostPath jail on the real workspaceYou want the agent in your current files
containerDocker/Podman (tier 2; see spec)CI / less trusted tasks
remoteE2B / Daytona-style (tier 3; see spec)Stronger isolation

Default path

text
.zox/worktrees/<sessionId>/

Session start: git worktree add on a zox/<sessionId> branch (requires git). Non-git projects fall back to host with a warning unless configured otherwise.

Session end: default keep the worktree (sandbox.worktree.cleanup: keep | remove). CLI flag --keep-worktree applies to agent-run style jobs.

Executor refusals

Before spawn: executable denylist (sudo, rm, …), interpreter smuggling flags, shell metacharacters when not using a shell, realpath path jail (symlink escape resistant).

CLI

sh
zox --sandbox host

In session: /sandbox host.