Durable Session Storage
Durable Session Storage
In Anthropic's Managed Agents Architecture, the session is an append-only log of events that lives outside both the Brain (harness) and the Hands (containers). It is the durability layer of the system.
Purpose
- Survives harness crashes and container failures.
- Enables replay-based recovery without in-process state.
- Provides an audit trail of all agent actions.
Recovery flow
Harness crashes
↓
New harness starts
↓
wake(sessionId) ← reconnects to session
↓
getSession(id) ← replays events from last checkpoint
↓
Agent resumes from last recorded state
Properties
| Property | Detail |
|---|---|
| Append-only | Events are only added, never modified — safe for concurrent access |
| External | Stored outside harness and container processes |
| Replayable | New harness can reconstruct context from log |
| Durable | Persists across process restarts and failures |
Relationship to stateless harness
The session log is what makes the stateless harness possible. Because all state is externalized, any harness instance is interchangeable — there is no "warm" harness that must survive for the session to continue.
Contrast with OpenClaw
In Agent Loop (OpenClaw), session state is managed by SessionManager with a write lock — more in-process. Anthropic's managed approach externalizes this entirely for cross-process durability.
Related
- Managed Agents Architecture
- Harness Design Pattern
- Agent Loop (OpenClaw) — contrast: in-process session management
- Session Management (OpenClaw) — OpenClaw's concrete session model:
sessions.json+.jsonltranscript, DM isolation, lifecycle, cleanup