Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Agent shells

Use an agent shell to run commands with an agent’s sandbox settings. For commands outside the sandbox, use a host shell.

Open a sandbox shell

In the Agents sidebar, right-click an agent and choose Shell. The shell inherits the agent’s sandbox presets, network mode, DNS, resource limits, persistent /tmp setting, and project/worktree mounts. It has its own private copies and, when enabled, its own persistent /tmp; it does not share the agent’s private state. The shell is temporary: stopping it or exiting removes its private state, including persistent /tmp. See Input and panes for terminal controls.

Choose the agent’s tool shell

Settings > Commands > Defaults > Agent shell chooses the shell advertised to tools inside sandboxed agent sessions through the SHELL environment variable. It defaults to bash. Restart the agent after changing it.

This setting is separate from the User shell default used by shell errands. It does not change host panes, shell errands, or explicit tool-call shell overrides. See Command presets for managing available commands.

Shell configuration

Choosing a shell preset does not share host dotfiles. Where a matching *-userdata sandbox preset is available, enable it in the agent editor to include the shell’s host files.

These presets expose startup and configuration files as read-only, and history and data paths as read-write. See Sandbox presets to inspect or customize their mounts.