Share feedback
Answers are generated based on the documentation.

sbx run

DescriptionRun an agent in a sandbox
Usagesbx run [flags] SANDBOX | AGENT [PATH...] [-- AGENT_ARGS...]

Description

Run an agent in a sandbox, creating the sandbox if it does not already exist.

Pass agent arguments after the "--" separator. Additional workspaces can be provided as extra arguments. Append ":ro" to mount them read-only.

To create a sandbox without attaching, use "sbx create" instead.

Available agents: claude, codex, copilot, docker-agent, gemini, kiro, opencode, shell

Options

OptionDefaultDescription
--branchCreate a Git worktree on the given branch (use --branch auto to auto-generate)
-m, --memoryMemory limit in binary units (e.g., 1024m, 8g). Default: 50% of host memory, max 32 GiB
--nameName for the sandbox (default: <agent>-<workdir>)
-t, --templateContainer image to use for the sandbox (default: agent-specific image)

Global options

OptionDefaultDescription
-D, --debugEnable debug logging

Examples

# Create and run a sandbox with claude in current directory
sbx run claude

# Create and run with additional workspaces (read-only)
sbx run claude . /path/to/docs:ro

# Run an existing sandbox
sbx run existing-sandbox

# Run a sandbox with agent arguments
sbx run claude -- --continue