self-hosted-sandboxes-security changedmanaged-agents/self-hosted-sandboxes-security
Nearest release: v2.1.328, published 7 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+18added
Lines−5removed
From line
42
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits19to this page, all time
The whole hunk
from line 42, old and new numbered
/
from line 42
4242## What you own
4343
4444* **Sandbox image quality and runtime hardening.** Anthropic does not inspect or verify your sandbox image. Follow best practices such as dropping unnecessary Linux capabilities, running as a non-root user, and using a read-only root filesystem.
45* **Network egress controls.** Your sandbox’s network access is determined by your VPC and firewall rules. Without egress restrictions, a compromised tool execution can reach arbitrary external hosts. Restrict outbound traffic to only the endpoints your tools require.
45
46* **Network egress controls.** Your VPC and firewall rules determine your sandbox’s network access. Without egress restrictions, a compromised tool execution can reach arbitrary external hosts. Restrict outbound traffic to only the endpoints your tools require.
47
4648* **Service key storage and rotation.** The environment service key (`ANTHROPIC_ENVIRONMENT_KEY`) authorizes polling your environment’s work queue and submitting results back to sessions. Store it in a secrets manager, not in environment files or sandbox images. Rotate it immediately if you suspect exposure.
47* **Isolating untrusted workloads.** The environment service key is scoped to one environment’s work queue. If you run untrusted code inside your sandbox, consider provisioning a separate workspace and environment for each trust boundary. This limits each key to a single user’s sessions instead of a shared pool.
48* **Per-session credentials.** Each work item your worker claims can carry a per-session `secret` (csharp, go: `Secret`), which the worker uses in place of the environment service key. Access to [memory stores](https://platform.claude.com/docs/en/managed-agents/memory) requires the `secret` (csharp, go: `Secret`): the memory store endpoints reject the environment key (see [Forward the work item’s secret](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-workers#forward-the-work-items-secret)). Pass the `secret` (csharp, go: `Secret`) only into the sandbox that serves that session, keep it out of images and shared volumes, and never log it.
49
50* **Untrusted workload isolation.** The environment service key is scoped to one environment’s work queue. If you run untrusted code inside your sandbox, consider provisioning a separate workspace and environment for each trust boundary. This way, each key reaches only one trust boundary’s sessions, such as one user’s, rather than every session in a shared environment.
51
52* **Per-session credentials.** Each work item your worker claims can carry a per-session `secret` (csharp, go: `Secret`), which the worker uses in place of the environment service key. Access to [memory stores](https://platform.claude.com/docs/en/managed-agents/memory) requires the `secret` (csharp, go: `Secret`): the memory store endpoints reject the environment service key (see [Forward the work item’s secret](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session#forward-the-work-items-secret)). Pass the `secret` (csharp, go: `Secret`) only into the sandbox that serves that session, keep it out of images and shared volumes, and never log it.
53
4954* **Tool-execution blast radius.** Tools run inside your sandbox with whatever permissions your process has. Apply least privilege to the process user and mount only the directories your tools require.
55
5056* **Log retention and session content.** Conversation content and tool outputs pass through your worker and stay in your environment. You are responsible for retaining, redacting, or deleting that data in compliance with your own policies. Anthropic has no visibility into what your worker does with session content once delivered.
51* **Memory store contents.** [Memory stores](https://platform.claude.com/docs/en/managed-agents/memory) remain hosted by Anthropic, including their version history. When a session attaches one, the worker keeps a working copy under `/mnt/memory/` in your sandbox for the session’s duration and syncs changes back. The worker deletes that copy when the session ends, but a worker that exits without running its teardown leaves it behind. Cleanup of leftover copies, the permissions on that path, and isolation between sessions that share a filesystem are your responsibility.
52* **Read-only memory stores.** A store attached with `read_only` access is protected from upload, not from local modification. The worker’s `write` and `edit` tools refuse to write under its directory, nothing there syncs back, and the memory store endpoints reject writes to it made with the session’s `secret` (csharp, go: `Secret`). Other processes in the sandbox can still change the local copy: commands the agent runs through the `bash` tool, and [custom tools](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-custom-tools) or MCP servers you serve from the sandbox, which run with the worker’s permissions. Later tool calls in that session read the changed copy until that memory next changes in the store. If the agent must not be able to alter even its local view of such a store, disable the `bash` tool for that agent and give it no custom tool that writes to the sandbox’s filesystem.
57
58* **Memory store contents.** Anthropic hosts [memory stores](https://platform.claude.com/docs/en/managed-agents/memory), including their version history. When a session attaches one, the worker keeps a working copy under `/mnt/memory/` in your sandbox while it serves the session and syncs changes back. The worker deletes that copy when it finishes with the session (see [How the worker handles memory](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#how-the-worker-handles-memory)). A worker that exits without running its teardown leaves the copy behind. Cleanup of leftover copies, the permissions on that path, and isolation between sessions that share a filesystem are your responsibility.
59
60* **Read-only memory stores.** A store attached with `read_only` access is protected from upload, not from local modification.
61
62 * **What is blocked:** The worker’s `write` and `edit` tools refuse to write under the store’s directory. The worker uploads nothing from that directory. The memory store endpoints reject requests that use the session’s `secret` (csharp, go: `Secret`) to write to the store.
63 * **What is not blocked:** Commands that the agent runs through the `bash` tool can change the local copy. So can [custom tools](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-custom-tools) or MCP servers that you serve from the sandbox, which run with the worker’s permissions.
64 * **What happens to a changed file:** For as long as the worker serves the session, later tool calls read the changed file. The worker doesn’t restore it on its own. If that file gets a new version in the store during that time, the worker’s next sync overwrites the local file with that version.
65 * **How to prevent local changes too:** Disable the `bash` tool for that agent, and give it no custom tools or MCP servers that write to the sandbox’s filesystem.
5366
5467## What Anthropic cannot do for you
5568
No line in this hunk matches that.