Docker Sandboxes – Disposable, isolated sandboxes for AI agents
TL;DR Highlight
Running agents in microVMs lets you skip permission prompts while keeping the host safe
Who Should Read
A developer who wants to run Claude Code or Codex unattended without permission prompts but worries about their laptop
Core Mechanics
- It's a microVM, not a container
- Each sandbox gets its own kernel and private Docker Engine.
- Docker says there is no path back to the host.
- Isolation replaces permission prompts
- --dangerously-skip-permissions is the default.
- The boundary is infrastructure, not the agent's judgment.
- docker compose works inside the sandbox
- Each sandbox has its own private Docker Engine.
- No socket mounting or host privileges are needed.
- One YAML Kit pins the environment
- It sets tools, credentials, network rules, and config together.
- Run it with sbx run claude --kit <url>.
- Secrets and MCP are scoped per sandbox
- Real secrets stay on the host outside the VM.
Community Reactions
- The login requirement was the top complaint
- Several commenters said local sandboxes shouldn't need a login.
- Some preferred open source options without signup.
- Outbound firewall and secret injection are the draw
- One user said these two features made it their daily driver.
- They mount each git worktree in a per-repo sandbox.
- Linux support and custom mounts are missing
- One commenter said Linux support issues went unanswered.
- Another couldn't mount two directories for context.
- Many alternatives were shared
- Locki, Gondolin, Tart, Apple container, and devcontainers came up.
- One commenter argued permission isolation is the real fix.
How to Apply
- Install sbx and try it on a small repo
- Run brew install docker/tap/sbx, then sbx run claude.
- Compare the agent's changes against your host state.
- Enable MCP servers per project
- Run sbx mcp enable github-official --sandbox <name>.
- Don't enable it on other sandboxes.
- Write a team Kit YAML
- Put tools, network rules, and credentials in one YAML file.
- Have everyone start from it with the --kit option.
- Check login and Linux support first
- Confirm it fits your team's environment.
- Compare the open source alternatives from the comments if needed.
Try It
# Paste into your shell (macOS, install command from the source)
brew trust docker/tap && brew install docker/tap/sbx
# Run Claude Code in a sandbox
sbx run claude
# Enable GitHub MCP for one sandbox only
sbx mcp ls
sbx mcp enable github-official --sandbox {{sandbox-name}}
# Delete when done
sbx rm {{sandbox-name}}Terminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.