← all news

How Anthropic decoupled its agents' brain from their hands

AI · · · source (anthropic.com)

Anthropic's engineering team describes how it rebuilt the plumbing behind its hosted agents. The old design kept everything in one container: the session log, the orchestration code, and the sandbox where Claude runs commands. When that container died, the whole session died with it, and debugging meant reading WebSocket streams while user data sat right next to the agent. The rewrite splits the system into three independent parts. The session is now a durable, append-only event log that lives outside the runtime. The harness is a stateless layer that calls the model and decides what to do next. The sandbox is just an execution environment, which can be a container, an MCP server, or a set of custom tools.

The split changes how failures are handled. The harness talks to a sandbox through a small interface, roughly execute(name, input), and a dead sandbox is treated as an ordinary tool error, so the harness can request a fresh one and keep going. If the harness itself crashes, it wakes on the session id, replays the event history, and resumes from the last event. Credentials never reach the sandbox where model-written code executes: git tokens are bundled only at initialization, and OAuth tokens stay in a vault behind a proxy. Because the session log is external, the model can query it by position and work past its context window. Anthropic reports the practical payoff in latency. Time to first token fell by roughly 60 percent at the median and more than 90 percent at the 95th percentile, since inference no longer waits for a container to be provisioned.

Why it matters

If you build long-running agents, this is a concrete reference for surviving crashes without losing a session, and the brain and hands split is a pattern you can copy. The latency numbers also show where the time was actually going.

AnthropicAgents