AI GLOSSARY · AGENTS AND AGENT TOOLING
Sandbox
Definition
For coding agents, a sandbox is an operating-system-enforced boundary around commands they run, limiting which files they can write and which network hosts they can reach. Claude Code and Codex both document one.
Also called: AI sandbox, sandboxing, sandboxed agent, code sandbox, agent sandbox.
In plain language
A sandbox is a fenced-off area for an AI agent that runs commands on your computer. Claude Code's documentation says its sandbox covers shell commands only, is off by default, and does not run on native Windows. The same page says sandboxing reduces risk but is not a complete isolation boundary.
Technical definition
Claude Code's documentation describes its sandbox as a boundary that the shell commands Claude runs, and the processes they start, begin inside. By default sandboxed commands can write to the working directory, a per-user temp directory and added directories, while reads cover most of the machine. Network connections go through a proxy that checks each host against allowed domains, which start empty. The docs name Seatbelt on macOS and bubblewrap on Linux and WSL2, and call sandboxing, permission rules and permission modes complementary layers. They state that file tools, local MCP servers and hooks run outside the sandbox. OpenAI's Codex documentation lists the common sandbox modes read-only, workspace-write and danger-full-access, and says the approval policy decides when the agent must stop and ask.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Skill Almanac · Illustrative, not executed
coding-agent-guardrails 60/100 · grade CScored · Method v0.2 · How we score
- What you see
- A pre-action checklist for coding agents plus a read-only audit of a repo's guardrail setup.
- Why it exercises the concept
- It checks the guardrail setup of a repository that coding agents work in.
Coding tool · Illustrative, not executed
Codex
- What to try
codex- What you see
- Codex's documentation lists the sandbox modes read-only, workspace-write and danger-full-access.
- Why it exercises the concept
- The same page says the sandbox sets technical boundaries and the approval policy decides when the agent must stop and ask.
Coding tool · Illustrative, not executed
Claude Code
- What to try
claude- What you see
- Claude Code's documentation says its sandbox is off by default and is turned on by running /sandbox.
- Why it exercises the concept
- The same page calls sandboxing, permission rules and permission modes complementary layers.
How it shows up when you use agents
When a coding agent runs shell commands, a sandbox sets what those commands can reach. Claude Code's documentation says its sandbox is off by default and is turned on with /sandbox, and that it does not run on native Windows, where commands run unsandboxed. In Codex the sandbox mode is a named setting, and the approval policy is a separate setting beside it.
Codex's documentation says the sandbox reduces approval fatigue: the agent can keep working inside the boundary, and the approval flow takes over when it needs to go beyond it. Claude Code's documentation says the sandbox covers shell commands only, and that file tools, local MCP servers and hooks run outside it. It lists reads as covering most of the machine, including credential files such as ~/.ssh and ~/.aws/credentials, unless you change that.
Related ideas: guardrails, prompt injection and human in the loop.
Common confusions
- Sandbox versus permissions. In Claude Code's documentation, permission rules control which tools can be used and are evaluated before a tool runs, while the sandbox gives OS-level enforcement on what shell commands can access. The page calls them complementary layers.
- Sandbox versus approval policy. In Codex's documentation, the sandbox defines technical boundaries, and the approval policy decides when the agent must stop and ask before crossing them.
- Myth: a sandbox is a complete boundary. Claude Code's documentation says sandboxing reduces risk but is not a complete isolation boundary.
Related terms
Terms that mention Sandbox
19 terms mention this one
Guides that mention Sandbox
- Claude skills vs MCP vs plugins: what each one is for
- What Is an OpenClaw Skill? Format, Install, Gating, Safety
- Agentic Coding Tools: What They Are and How to Choose One
- Claude Code plugins explained: install, build, validate
- Codex vs Claude Code: Config Files and Sandbox
Show all 18 guides
- Open-source AI agents: criteria for comparing them
- What Is Claude Code and What It Can Touch on Your Machine
- What Is Claude Cowork? Plans, Beta Status, vs Code
- Autonomous AI Agents: Risks and Guardrails
- Cloudflare MCP servers: endpoints, access and permissions
- Install Claude Code: Native, Homebrew, WinGet, or npm
- OpenCode Skills: Where They Live and How Agents Load Them
- What Are MCP Apps? Interactive UI in AI Chats
- What Is Agentic AI? A Test for Telling Agents Apart
- Add a Claude Code Plugin Marketplace: Commands, Scopes and Trust
- Check a Claude Skill From GitHub Before Installing It
- Impeccable skill: what it does, how to install it and how it compares
- Self-Hosting an AI Agent: What You Take On
More in Agents and agent tooling
Sources
- Sandboxing, Anthropic (Claude Code Docs) (accessed 2026-11-24)
- Sandboxing, OpenAI (Codex docs) (accessed 2026-11-24)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-24. Wikipedia is never the only source.
Review record
Last verified
Drafted by Claude and Codex (automated drafting); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-24. Last verified .
Change log (5)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled. Relevant topic demand only; definition intent unconfirmed.
- : First version.
- : Verifier pass: added native Windows limitation from Anthropic docs.
- : Stage-3 accuracy pass: removed unsourced advice, worktree example and prompt-injection claims; narrowed claims to the Claude Code and Codex documentation wording.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.