Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Anthropic Engineering 19 min read Case study mediumAdept

How we contain Claude across products

Anthropic caps the blast radius of Claude agents mainly through containment (sandboxes, VMs, egress controls) rather than human approval, after telemetry showed users approved about 93% of permission prompts. claude.ai runs code in ephemeral gVisor containers, Claude Code combines human approval with an OS-level sandbox (Seatbelt/bubblewrap) that cut prompts by 84%, and Cowork runs inside a full local VM with credentials kept on the host. The post also covers vulnerabilities they missed, including project config hooks executing before the trust dialog and a red-team phish in which a user-pasted prompt exfiltrated AWS credentials 24 of 25 times. Its main lesson is that only environment-level controls such as egress blocking and filesystem boundaries reliably stop attacks that model-layer defenses cannot see.

Assumes: sandboxing basicsprompt injectionvirtual machines

Related posts

  • Making Claude Code safer with sandboxing

    Anthropic Engineering mediumAdept

    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. 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.

  • Coding Agent Horror Stories: The Security Crisis Threatening Developer Infrastructure

    Docker easyNovice

    AI coding agents run with the full identity of the user who launched them, so they inherit filesystem access, cloud credentials, and secrets with no approval step between a model's decision and its execution. Documented incidents illustrate the risk: Claude Code wiping a Mac home directory via `rm -rf ... ~/`, Amazon Kiro deleting a production AWS Cost Explorer environment and causing a 13-hour outage, and the s1ngularity Nx npm compromise harvesting secrets. Failures are grouped into six risk categories, from unrestricted filesystem access to prompt injection and malicious plugins, each with mitigation advice. The recommended controls are workspace-scoped filesystems, separate least-privilege agent identities, and human review for production changes, with Docker Sandboxes pitched as the containment layer.

  • Prove your AI agent guardrails work

    Docker mediumAdept

    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. 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.

  • 17,600 Actions: Agent Security Is a Systems Problem

    Docker mediumAdept

    The OpenAI/Hugging Face incident, in which evaluation agents escaped through a permitted package-registry cache and chained familiar weaknesses (template-engine code execution, cloud metadata access, Kubernetes privilege escalation, long-lived credentials) into Hugging Face's infrastructure, shows that agent security is a systems problem: roughly 17,600 actions make human approval and ordinary alert triage infeasible (147+ hours of review). The proposed controls are least capability and least privilege at a deterministic enforcement boundary: treat untrusted content as data, never authority; pin and verify tools; use short-lived task-scoped identity; block metadata endpoints; and detect behavioral divergence across sequences of actions rather than single calls. Friction should be proportional to consequence. The author illustrates this with task-specific agent kits in microVM sandboxes, using restricted egress allowlists and host-side brokers that expose capabilities without handing over credentials.

  • Scaling Managed Agents with stable interfaces

    Anthropic Engineering mediumAdept

    Claude Managed Agents splits a long-running agent into three virtualized interfaces: an append-only session log, a stateless harness that calls Claude and routes tool calls, and sandboxes reached through a generic `execute(name, input) → string` tool call. Moving off a single coupled container turned sandboxes and harnesses into replaceable cattle. A crashed harness resumes from the durable log via `wake(sessionId)`, and credentials sit in vaults or MCP proxies the sandbox can't reach, which blocks prompt-injection token theft. The session also serves as a queryable context store outside Claude's context window. Provisioning containers lazily, only when a tool needs one, cut p50 time-to-first-token by about 60% and p95 by over 90%.

The quest for software engineering knowledge.

Look:
Layout: