Sandboxing
Zed's agent panel now sandboxes the terminal and fetch tools by default (from 1.14) using OS-enforced restrictions: Seatbelt on macOS, Bubblewrap namespaces on Linux, and WSL on Windows. Default rules block writes outside project directories, writes to .git (which could plant hooks that run unsandboxed), and network access, and agents must request escalation with a stated reason. Instruction-following and command-matching rules like banning `git .*` are trivially bypassed via shells, env vars or other interpreters, and a symlink-swap TOCTOU race between user approval and bwrap bind mounting could grant write access to arbitrary readable directories, which Zed detects and fails closed on. The sandbox is one defense layer and does not cover the edit tool, ACP agents, LSP/MCP servers, build.rs, proc macros or git hooks run outside it.
Related posts
- Inside the Codex sandbox
OpenAI mediumAdept
Codex sandboxes agent-run commands in the user's own environment by using each OS's native sandboxing facilities rather than VMs or containers, so native toolchains like Xcode and the iOS simulator keep working. The default :workspace profile allows writes inside the workspace but keeps .git and .codex read-only, allows broad reads, and disables network access. That still leaves risks such as tampering with ignored node_modules, which is why OpenAI treats the sandbox as one layer of defense in depth. The post covers the cross-platform spawn API, per-command permission escalation in the exec_command tool, TOML permission profiles with filesystem and domain rules, a network proxy, and layered enterprise managed requirements, before describing enforcement on macOS, Linux and Windows.
- Making Claude Code safer with sandboxing
Anthropic Engineering mediumAdeptClaude Code now sandboxes its bash tool using OS-level primitives (Linux bubblewrap, macOS seatbelt) to enforce filesystem isolation (writes limited to the working directory) and network isolation (traffic forced through a Unix domain socket to an external proxy that allowlists domains), covering all spawned subprocesses. Both boundaries are required, since without network isolation a prompt-injected agent can exfiltrate secrets and without filesystem isolation it can escape the sandbox. Internally this cut permission prompts by 84%, and the runtime is open-sourced for sandboxing other agents and MCP servers. Claude Code on the web runs sessions in cloud sandboxes that never hold real credentials. A git proxy validates a scoped credential and the push target before attaching the GitHub token.
- How to Choose the Right Sandbox for AI Agents
LangChain easyNoviceAgents that write and run code face prompt injection risk, and Willison's "lethal trifecta" (sensitive data, untrusted content, external communication) and Meta's "Agents Rule of Two" frame when autonomy becomes dangerous. A good sandbox narrows that exposure with an isolated filesystem, egress allowlists, resource limits, controlled reuse, and kernel-level isolation via microVMs, since container-only setups like a default Kubernetes Agent Sandbox deployment share the host kernel. Running the sandbox as a tool rather than putting the agent inside it keeps API keys and agent state out of the execution environment at the cost of network latency. The piece closes by pitching LangSmith Sandboxes, which use per-sandbox microVMs and an auth proxy that injects credentials outside the sandbox.
- Prove your AI agent guardrails work
Docker mediumAdeptCoding agents with broad access can leak credentials or delete files, as two reported July 2026 incidents show: Grok Build CLI silently uploaded whole repositories, including ignored files and planted secrets, to cloud storage, and a Full Access agent deleted a user's home directory after alternatives to blocked rm succeeded. The fix is least privilege enforced on the whole agent application, not on the model's instructions. Docker Sandboxes run agents in microVMs behind a host proxy, and Docker AI Governance adds org-wide network policy (including HTTP method/path rules), filesystem mount policy with deny-wins semantics, proxy-injected credentials kept outside the VM, and MCP gateway access rules. A bank-log demo walks through configuring and testing the network and filesystem controls with sbx.
- Running Codex safely at OpenAI
OpenAI mediumAdept
OpenAI runs Codex internally inside a bounded environment. A sandbox limits where it can write and whether it can reach the network, approval policies make higher-risk actions stop for review, and an auto-review subagent approves routine low-risk requests so users are not constantly interrupted. Admin-enforced requirements files cover network allow/deny lists through a proxy, Starlark prefix rules for shell commands, and OS-keyring credential storage pinned to an enterprise ChatGPT workspace. OpenTelemetry export of prompts, approval decisions, tool results and proxy events feeds a SIEM and an AI security triage agent that explains why the agent did something, not just what happened.