Gemini CLI sandboxing
Gemini CLI's built-in sandbox: macOS Seatbelt profiles or a Docker/Podman container around the agent's tool calls, with gVisor, LXC and a Windows option. Adequate built-in confinement for Gemini CLI users; it is a feature of the CLI rather than a general sandbox.
Overview
Gemini CLI ships sandboxing for the commands and tools the agent runs. It is enabled with -s/--sandbox, GEMINI_SANDBOX or "sandbox": true in settings. On macOS the lightweight option is the built-in Seatbelt framework via sandbox-exec, with SEATBELT_PROFILE selecting among permissive/restrictive/strict profiles in open or proxied network variants; the default permissive-open "denies operations by default" and limits writes to the project directory. Elsewhere it runs the agent in a Docker or Podman container from ghcr.io/google/gemini-cli:latest, replaceable with a project .gemini/sandbox.Dockerfile. gVisor, LXC/LXD (experimental) and a Windows native sandbox are also listed.
Tool-level sandboxing is on by default (security.toolSandboxing). The docs note GUI applications may not work in sandboxes and that gVisor cannot reach host loopback services. The CLI is Apache-2.0; its README states it is now aimed at Gemini Code Assist Standard/Enterprise licences and that free individual access moved to Antigravity CLI on 18 June 2026.
Notable
- Six Seatbelt profiles on macOS; default permissive-open; container image ghcr.io/google/gemini-cli:latest
- README: free individual and Google AI Pro/Ultra access moved to Antigravity CLI on 18 June 2026; Gemini CLI targets Code Assist Standard/Enterprise
- Release channels: Preview (weekly), Stable (weekly), Nightly (daily)
Gemini CLI sandboxing specifications
| Attribute | Details |
|---|---|
| Isolation | macOS Seatbelt (sandbox-exec) with six profiles from permissive-open (default) to strict-proxied; Docker or Podman container on any platform; gVisor (runsc), LXC/LXD (experimental) and a Windows native sandbox each on their own OS |
| Deployment | Local / OS-level |
| Open source | Yes (Apache-2.0) |
| SDKs and interfaces | CLI |
| Cold start (vendor claim) | Not documented |
| Max session length | Not documented |
| Persistence | Works on the project directory on the host; the default Seatbelt profile limits writes to the project directory |
| GPU | Not documented |
| Networking | -open Seatbelt profiles allow direct network access, -proxied profiles route through a proxy; container sandboxes can be run with --network=none, which also blocks the Gemini API |
| Pricing | Free, open-source CLI; the README says it is designed for Gemini Code Assist Standard/Enterprise licences with no free tier |
| Free tier | Not documented |
| Compliance | Not documented |
| Regions | Not documented |
Facts from Gemini CLI sandboxing’s public documentation, verified November 9, 2026. Performance numbers are vendor claims.
Strengths and trade-offs
Strengths
- You use Gemini CLI and want built-in confinement with no extra tooling on macOS
- You want a container-based sandbox with a custom Dockerfile on Linux
- You need a proxied network profile for the agent
Trade-offs
- Seatbelt shares the host kernel; container isolation depends on Docker/Podman
- LXC is experimental and must be pre-created; gVisor must be selected explicitly
- The CLI is now positioned for enterprise Code Assist licences
Good fit for: Confining Gemini CLI tool execution on a developer machine using built-in OS or container sandboxing.
Use cases Gemini CLI sandboxing fits
- Local agents: Gemini CLI’s built-in sandboxing via macOS Seatbelt or Docker and Podman containers.
How Gemini CLI sandboxing compares
| Sandbox | Isolation | Open source | Self-host / BYOC | Cold start (vendor) | Max session | Snapshots / pause | GPU | SDKs |
|---|---|---|---|---|---|---|---|---|
| Gemini CLI sandboxing | Seatbelt or container | Yes | No / No | Not documented | Not documented | No / Not documented | Not documented | CLI |
| Codex CLI sandboxing | Seatbelt / bubblewrap / Windows | Yes | No / No | Not documented | Not documented | No / Not documented | Not documented | CLI |
| Anthropic Sandbox Runtime | OS-level (Seatbelt / bubblewrap) | Yes | Yes / Not documented | Process start | Not documented | No / No | Not documented | CLI (srt), TypeScript (npm) |
| nono | Landlock / Seatbelt | Yes | No / No | Not documented | Not documented | Yes / Not documented | Not documented | CLI, Rust, Python, JavaScript/TypeScript, Go |
| Docker Sandboxes | MicroVM | No | Yes / No | Not documented | Until removed (local) | Yes / Yes | Yes | sbx CLI, TypeScript (cloud), REST API (cloud) |
| Minimal | namespaces or libkrun microVM | Yes | No / No | Not documented | Not documented | Not documented / Not documented | Not documented | CLI, MCP server |
| gVisor | User-space kernel | Yes | Yes / No | ms (claim) | Not documented | Yes / Not documented | Yes | CLI |
Frequently asked questions
What is Gemini CLI sandboxing?
How does Gemini CLI sandboxing isolate code?
Is Gemini CLI sandboxing open source?
How much does Gemini CLI sandboxing cost?
What are the alternatives to Gemini CLI sandboxing?
Sources
Cite this page
Agent Sandboxes. (2026). Gemini CLI sandboxing. agentsandboxes.org. Last reviewed November 9, 2026. https://agentsandboxes.org/sandboxes/gemini-cli-sandbox/
Found an error or a missing sandbox? Submit a correction — every entry links to the sources it relies on.