---
title: "Sandboxing"
description: "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."
url: "https://swe.quest/articles/sandboxing-a1efb1bf6e8282ad"
canonical: "https://zed.dev/blog/sandboxing"
source: "Zed"
published: "2026-08-05"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 7
tags: ["sandboxing","ai-agents","ai-coding","linux","developer-tools"]
---

# Sandboxing

A post on [Zed](https://swe.quest/sources/zed.md), published 2026-08-05, 7 min read, Announcement. Original: [https://zed.dev/blog/sandboxing](https://zed.dev/blog/sandboxing)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- Linux namespaces ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- prompt injection ([easy posts on Application security](https://swe.quest/tags/appsec.md?difficulty=easy))
- coding agents ([easy posts on AI agents](https://swe.quest/tags/ai-agents.md?difficulty=easy))

## Keywords

Zed, Bubblewrap, Seatbelt, WSL, TOCTOU, prompt injection

## Related posts

- [Inside the Codex sandbox](https://swe.quest/articles/inside-the-codex-sandbox-f3a152d1a955ae56.md): OpenAI · 2026-11-18 · Medium · 23 min read · Sandboxing & isolation, AI agents, AI for coding, Security, Configuration management
  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.
- [Making Claude Code safer with sandboxing](https://swe.quest/articles/making-claude-code-safer-with-sandboxing-927e34fb9dfe9ca9.md): Anthropic Engineering · 2025-10-20 · Medium · 5 min read · Sandboxing & isolation, AI agents, AI for coding, Security
  Claude 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.
- [How to Choose the Right Sandbox for AI Agents](https://swe.quest/articles/how-to-choose-the-right-sandbox-for-ai-agents-9eb1c4b875269506.md): LangChain · 2026-11-18 · Easy · 7 min read · Sandboxing & isolation, AI agents, Security, Virtualization
  Agents 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.
- [Prove your AI agent guardrails work](https://swe.quest/articles/prove-your-ai-agent-guardrails-work-2a4587e8e9b27383.md): Docker · 2026-11-25 · Medium · 16 min read · Sandboxing & isolation, AI agents, Security, Identity & auth, AI for coding
  Coding 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.
- [Running Codex safely at OpenAI](https://swe.quest/articles/running-codex-safely-at-openai-ba7fb69d40cdeaed.md): OpenAI · 2026-05-08 · Medium · 5 min read · AI agents, Sandboxing & isolation, AI for coding, Configuration management, Observability
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
