Anthropic’s architectural pattern for production long-running agents, introduced in Scaling Managed Agents: Decoupling the brain from the hands and shipped as Claude Managed Agents in early 2026. The idea: an agent has three components that should be independently replaceable, and most production pain comes from coupling them.

ComponentWhat it isLifecycle
BrainThe model + the harness loop that calls itStateless; fresh containers can take over mid-run
HandsSandboxed, ephemeral execution environments where tools actually runCattle, not pets — disposable; failure ≠ session failure
SessionAppend-only event log of every thought, tool call, and observationDurable; the source of truth

The argument

Key

“Every component in a harness encodes an assumption about what the model can’t do on its own.” — Anthropic

When the three are coupled, an assumption that goes stale (e.g. the model used to need an explicit planner; now it plans natively) means the whole system has to change at once. When they’re decoupled:

  • The harness becomes stateless — any container can pick up any session.
  • Sandboxes become cattle, not pets — provision a fresh one whenever you need it; throw it away when done.
  • A brain crash doesn’t lose the run — a new container calls wake(sessionId) and reconstitutes state from the event log.

Concrete payoff Anthropic reported: time-to-first-token dropped ~60% at p50 and over 90% at p95, just from being able to start inference before the sandbox is ready.

The session log is the load-bearing piece

“The session-as-event-log idea is the part most teams underappreciate. It is what makes a long-running agent recoverable.” — Addy Osmani

Without it, a container failure is a session failure and you’re debugging into a stale snapshot. With it, the agent’s memory is a queryable artifact that lives outside whatever process happens to be running at the moment. This is the same insight as the wider observability story in Session Observability and Replay — the durable log is what makes the agent recoverable, debuggable, and auditable.

The session is append-only. That matters: it’s not a database that gets edited as the agent’s understanding changes. It’s a tape of what actually happened, and any current “view” is a derivation from that tape. This is what enables true replay and forking, not just resumption (see Session Observability and Replay on the four meanings of “replay”).

How it composes with other patterns

  • Long-Running Agents - Initializer + Coding Pattern runs inside this architecture: the initializer/coding-agent split is a brain pattern; the four artifacts are what gets written to the workspace inside the hands; git history is one half of the durable session story.
  • Ralph Loop is the same shape with the bash loop standing in for the harness, the file system standing in for hands, and progress.txt + git as a poor-man’s session log. Brain/Hands/Session is what you graduate to when those three bash artifacts need to become a recoverable, multi-tenant, audited service.
  • Gemini Enterprise Agent Platform ships exactly this split as named services: Agent Runtime is the brain, Agent Sandbox is the hands, Agent Sessions is the session.
  • Cursor Planner Worker Judge decomposes the brain into multiple specialised roles (one model loop is not enough) and runs them against shared hands and shared session.

Security: where this pattern earns its keep

The split is also a security posture. Credentials should be unreachable from the sandbox where model-generated code runs. With a coupled architecture you have to trust the model not to exfiltrate them; with brain/hands separation, the sandbox literally never has them. Anthropic calls this out as one of the reasons to use Managed Agents over rolling your own. (See the cost/security/drift/verification limitations enumerated in Long-Running Agents.)

What “decoupled” lets you change independently

  • Swap the model without touching session storage or sandbox infra
  • Swap the sandbox (Linux container → Firecracker microVM → remote dev environment) without touching the brain
  • Replay or fork a session into a different sandbox for debugging
  • Scale the brain (model inference) and hands (compute) independently — they have different load curves

Sources

  • Long-Running AI Agents — Osmani’s summary of Scaling Managed Agents: Decoupling the brain from the hands; the latency numbers (~60% p50 / 90%+ p95) and wake(sessionId) mechanic