Decoupling the Brain from the Hands: Claude Managed Agents (Part 1 of 4)

Priyanka Phatak, Anthropic, Gabe Cemaj, Anthropic17:40 · Oct 2026 · 20K views
Thumbnail for Decoupling the Brain from the Hands: Claude Managed Agents (Part 1 of 4) Watch on YouTube
TL;DR
  1. 1

    An agent is a model in a loop with tools, supported by a harness and a sandbox.

  2. 2

    Anthropic replaced its single-container design with an append-only session log, a replaceable brain, and disposable hands.

  3. 3

    Keeping credentials at an egress proxy prevents Claude from seeing or exposing them, while starting inference before sandbox creation reduced time to first token by about 90%.

Summary

Priyanka Phatak explains how Anthropic redesigned Claude Managed Agents after its first architecture put the session log, harness, and sandbox in one container. That design was easy to edit, but it created a stateful "pet" that was difficult to debug, hard to inspect when it contained customer data, and awkward to connect to customer infrastructure. The new design separates the append-only session log from the brain, which contains the harness and Claude, and the hands, which include sandboxes and tool calls. Sandboxes can be created on demand and replaced after failure. Credentials are injected by a proxy when a sandbox calls an external service, so Claude never receives the tokens. The session log also lets Anthropic change compaction strategies and restart a harness from the last event. Phatak then introduces the environment, agent, session, and event interfaces through a joke-teller example.

Key ideas
02:07

An agent combines a model loop with a harness and a sandbox

Priyanka Phatak defines an agent as a model that decides what to do, calls tools, and repeats the loop until the task is complete. The harness wraps around the model and manages those calls, the context, and the gaps in the model's abilities. The sandbox gives the agent a place to run code, edit files, and install dependencies. Since that code can be untrusted or buggy, production tasks should run in isolated containers with a limited blast radius.

02:59

Harnesses encode assumptions that become stale as models change

A harness fills in abilities that a model does not have, so it necessarily contains assumptions about that model. Phatak gives context handling as an example. One model would rush to finish as it approached its context limit, so the harness added a context reset. A later model did not have that limitation, so the reset was unnecessary. The harness therefore has to track model behavior as new models arrive.

05:07

Putting the session, harness, and sandbox in one container created a stateful pet

Anthropic's first Managed Agents architecture stored the session log in the container, ran the harness there, and executed sandbox work there too. The local design had no service boundaries and made file edits simple system calls. It also made the whole container a named, hand-tended entity. Debugging was difficult because a dropped packet and a dead container looked similar, while investigating customer data required access to the container. Connecting to a customer's MCP service could require network peering or shipping the harness to the customer.

07:39

Separating the brain from the hands makes failures replaceable

The redesign has three interfaces. The session is an append-only log of everything that happened. The brain is Claude together with the harness or agent loop. The hands are sandboxes, MCP tool calls, and other tools that are provisioned when needed and removed when the work is done. If a sandbox fails, the agent can treat that failure like a tool error and create another sandbox. If the harness fails, a new instance can read the session events and resume from the last event.

09:05

An egress proxy keeps credentials outside Claude's view

In the earlier design, credentials lived inside the sandbox, which made prompt injection more dangerous. In the new design, a sandbox request for an external service goes through a proxy. The proxy adds the token before sending the request to the external endpoint or MCP service. Claude never receives the credential, so it cannot be prompted to print it or write it to a file.

09:49

An immutable event log lets compaction change independently

The session stores every event instead of rewriting the event stream during compaction. A compaction strategy can then choose whether to summarize the full log or include only the last set of events in context. Phatak says this design also let Anthropic begin inference immediately rather than waiting for a sandbox to start. Time to first token fell by about 90% because the sandbox was created only when the agent needed it.

13:49

The core API flow starts with an environment, then an agent and a session

The environments API defines the sandbox template, including networking rules and installed packages. An agent then gets a name, a selected model, a system prompt, and tools such as the basic bash, read, write, and grep tool set. A session combines an agent ID with an environment ID and starts idle. Work begins when the client sends an event, such as a request for a joke about distributed systems.

15:32

Sessions expose work through an event stream

A session event stream contains messages sent by the user and responses from the agent. Custom tools produce a custom tool-use event that the client handles and answers with a tool result. The stream can also report session errors, an idle status, and an interrupt when the client stops the work. This event interface lets the client observe and control the session without putting the harness inside the sandbox.

"So if you take one thing home from this, it's that harnesses encode assumptions and assumptions can go stale."Priyanka Phatak11:15
Who should watch
  • You are designing an agent platform and need to decide what belongs in the model loop, session state, or execution environment.
  • Your current agent runs in one long-lived container and failures are hard to inspect or recover from.
  • You need agents to access customer services without putting long-lived credentials into the model's execution environment.