# OS sandbox

URL: https://codepanel.ai/glossary/os-sandbox

Kernel-enforced isolation (macOS sandbox-exec or Linux bubblewrap) that restricts which files, git refs, and networks a coding agent can reach.

An OS sandbox is an operating-system-enforced restriction on a child process's filesystem, network, and IPC access, such as `sandbox-exec` on macOS or `bwrap` (bubblewrap) on Linux. In CodePanel's local runner, every shell command, test check, stdio MCP server, and external coding CLI runs inside an OS sandbox so an agent cannot read `~/.ssh`, cloud credentials, or sibling [git worktrees](/glossary/git-worktree), and cannot move `main`.

## Overhead and limits

Measured on an Apple M1 Pro, macOS `sandbox-exec` adds 10.4 ms median overhead per command ([Sandboxing a coding agent's shell on a laptop](/blog/sandboxing-local-coding-agents)). Rule-started [Autopilot](/agent-autopilot) runs also disable network access inside the sandbox by default. An OS sandbox bounds local commands cleanly, though it remains weaker isolation than a separate remote container or VM.
