Skip to content

Sandboxed panes

Linux only

A sandboxed pane runs its shell, and every agent started in it, inside a bubblewrap sandbox:

  • read-write in its repository or worktree
  • read-only for the rest of the system
  • an empty home that holds only shell startup files and agent state (~/.claude, ~/.codex, and so on), and never ~/.ssh, ~/.aws, ~/.gnupg, or the rest of your files

Agent and git settings that could run code on your machine later are read-only inside it. A sandboxed pane can also run offline.

Sandboxed panes need the bubblewrap package (the bwrap command). Without it, a sandboxed pane doesn’t start.

Shortcut
New sandboxed tab Ctrl+Shift+Alt+T
Split a sandboxed pane to the right Ctrl+Shift+Alt+S
Offline variants Right-click a tab or pane

Or from a script:

Terminal window
cortland-ctl pane split "$CORTLAND_PANE_ID" --sandbox --exec claude
cortland-ctl pane split "$CORTLAND_PANE_ID" --no-network --exec codex # implies --sandbox
cortland-ctl pane sandbox-info # what's mounted in this pane

Set [sandbox] enabled = true to make every new pane sandboxed.

Since a sandboxed agent can’t reach outside its workspace, Cortland trusts it with more by default. With auto_approve = true, which is the default, edits inside the workspace are approved without review (always_ask paths still ask), and agents start in auto mode.

Sandboxed panes talk to Cortland through a separate, restricted socket that’s mounted where the normal socket would be, so cortland-ctl and the agent hooks work unchanged. Through it, a sandboxed pane can only:

  • drive its own pane, and sandboxed panes in its own workspace (offline ones if it’s offline itself)
  • open new panes, which are always sandboxed and stay inside its workspace
  • create worktrees of its own repository, at the path Cortland gives the branch

It can’t remove worktrees, see panes outside its workspace, or approve its own edits.

[sandbox]
enabled = false # new panes start sandboxed
auto_approve = true # approve edits inside the workspace; agents start in auto
allow_network = true
extra_rw = [] # more paths to mount read-write, e.g. ["~/notes"]
extra_ro = [] # more paths to mount read-only
env = [] # variables to pass in, e.g. ["ANTHROPIC_API_KEY"]
# Per-repository additions; the longest matching path wins
[[sandbox.profile]]
path = "~/Repos/site"
extra_ro = ["~/Repos/shared-assets"]
env = ["NETLIFY_AUTH_TOKEN"]
allow_network = true