Container-based isolation by default
Gemini's sandbox is heavier than Claude Code's or Codex's — it's a real container (Docker / Podman) the agent runs inside. --sandbox spins up a container scoped to the working directory; the agent can write inside, but file changes only sync back when the session ends or on demand.
The trade: heavier setup (container runtime required) but real OS-level isolation. The agent literally cannot escape the container; nothing it does to /etc, ~/.ssh, or your filesystem outside the working directory matters.
Tool exclusion via -e: gemini --sandbox -e "WriteFile,RunShellCommand" disables specific tools even inside the container. Useful for "read-only audit" sessions even when the sandbox is on.