Inside the Claude Managed Agents Workshop: Pets, Cattle, Outcomes and Dreaming

AI Engineer 2026: Anthropic Talks
21 parts- 1Claude for Long-Horizon Tasks: Lance Martin's Four Rules for Agents That Run for Hours
- 2Inside the Claude Managed Agents Workshop: Pets, Cattle, Outcomes and DreamingCurrent
- 3How Anthropic Builds: Mike Krieger on Being Unreasonable With Claude
- 4How Jarred Sumner Ships Millions of Lines of Agent-Written Code
- 5A Field Guide to Fable: Thariq Shihipar on Unhobbling Claude and Finding Your Unknowns
- 6Claude Tag Lands 65% of Anthropic's Product PRs: Takeaways From Cat Wu and Thariq Shihipar
- 71,000 Claude Agents, Git and a Database: How Fable 5.2 Formalized Fermat Without a Custom Harness
- 8Your Old Prompts Are Making Claude Worse: Lance Martin's Checklist for Frontier Models
- 9Why One Agent Isn't Enough: Anthropic on Flows, UltraCode and Running 1,000 Agents
- 10Tokens Should Have Jobs: Anthropic's Case for Advisors, Graders and Dreamers
- 11Give the Agent a Budget, Not a Token: Anthropic's CI Team on Safe Agent Permissions
- 12Rethinking Claude Code Best Practices: Lydia Hallie on Getting Out of the Loop Safely
- 13How Anthropic Merges 30,000 Code Changes a Day: Addy Osmani on Verifying the Software Factory
- 14Using LLMs to Secure Source Code: Eugene Yan's Six-Step Pipeline From Anthropic
- 15From Messages API to Managed Agents: Anthropic's Applied AI Team on Harnesses That Go Stale
- 16Forward Deployed Engineering 101: When Your AI Startup Needs FDEs, From Palantir to Anthropic
- 17The Enterprise Tech Stack for AI Agents: Why Your POC Stalls and How to Design Past It
- 18The Claude Certified Architect Exam as a Field Guide to Agentic Engineering
- 19The Future of MCP: David Soria Parra on Connectivity, Progressive Discovery and Skills Over MCP
- 20Gateways Are All You Need: How Anthropic Thinks About MCP in the Enterprise
- 21How to Build Agents That Run for Hours: Anthropic's Planner, Generator and Evaluator Harness
TL;DR
What Anthropic's Managed Agents team taught in their two-hour AI Engineer workshop: why the first architecture failed, the core APIs, multi-session orchestration and dreaming.
Priyanka Phatak leads the engineering team that builds Claude Managed Agents. Gabe Cemaj works on it with them. At the AI Engineer World's Fair 2026 they ran a two-hour workshop, published as four videos, that goes from "what is an agent" to multi-session orchestration, scheduled deployments and a preview of dreaming. The conference Wi-Fi did not cooperate with the hands-on part, but the content holds up.
This is our condensed guide to all four parts, with the ideas worth keeping and the details that are easy to miss in the Q&A.
Sources, all from AI Engineer World's Fair 2026: Part 1: Decoupling the Brain from the Hands, Part 2: Build a Research Agent, Part 3: Scheduled Agents, Dreaming and Q&A, Part 4: Evals, CI/CD and Multi-Tenancy. Speakers: Priyanka Phatak and Gabe Cemaj, Anthropic.
Agent, Harness, Sandbox#
Phatak starts with three definitions that are worth stating precisely because people use them loosely:
- Agent: a model in a loop with tools, deciding the next action until the task is done.
- Harness: the layer around the model that runs the loop, manages context, and encodes assumptions about what the model cannot do.
- Sandbox: the computer where the agent's untrusted code actually runs. One task per container, to keep the blast radius small.
Their example of a harness assumption is a good one. Sonnet 4.5 had what the team called "context anxiety": as it neared the context limit, it rushed to wrap up. Harnesses built for Sonnet 4.5 added context resets to work around it. Opus 4.5 did not have the problem, so the workaround became dead weight. Every harness carries model-specific assumptions that go stale with each release, and keeping up with that is one of the main things a managed harness sells you. We made a similar argument in what is an agent harness.
Why the First Architecture Was a Pet#
The first version, shipped to early-access customers in December 2025, put everything in one container: the session log, the harness and the sandbox. The upside was simplicity. No service boundaries, and file edits were just syscalls.
The downside was the classic infrastructure "pets versus cattle" problem. A pet is a named, hand-tended machine; when it gets sick you nurse it back. Cattle are interchangeable; when one fails you replace it. A container that holds the only copy of a long session is a pet. If it dies, the work dies.
The rebuild virtualized the pieces behind interfaces "all the way down," as Cemaj put it in Part 2: the harness, the sandbox and even the event storage layer are separate components, so each can fail, scale or be swapped independently. Lance Martin covers the same architecture from a product angle in their long-horizon talk, and Anthropic's engineering post Decoupling the brain from the hands is the canonical write-up.
The Core APIs in Four Steps#
The no-code part of the workshop used the console quick start at platform.claude.com, but the underlying objects are the same ones you call from code:
- Environment. A template for the sandbox: networking (unrestricted, or limited to specific domains and MCP servers) and packages to install. Dependencies are installed at creation time and cached across sandbox restarts. They must come from public registries like npm, Cargo or PyPI, though you can upload files or attach GitHub repos to a session.
- Agent. A name, a model, a system prompt and tools. The built-in agent tool set covers the basics (bash, read, write, grep and so on) that almost every agent needs.
- Session. An agent plus an environment. This is your unit of work. It starts idle and does nothing until you send an event.
- Events. You send
user.messageevents and read back what the agent emits. Custom tools appear as a tool-use event you handle yourself and answer with a result. There are also error, idle and interrupt events.
For exact request shapes, use the Managed Agents docs rather than anything reconstructed from a talk. The point here is the mental model: environment, agent, session, event stream.
%% title: The Managed Agents object model
flowchart TD
E[Environment: sandbox template] --> S[Session: unit of work]:::emphasis
A[Agent: model, prompt, tools] --> S
S --> EV[Event stream: messages, tool calls, status]From Chat to Map-Reduce#
Cemaj's hands-on section built a financial research desk with Claude Code and a workshop skill checked into the repo, so attendees could replay it later. The progression is a useful template for any agent product:
- A custom chat interface over one session.
- Multi-agent: the main agent delegates to sub-agents.
- Skills: a skill that fetches and analyzes SEC filings for a ticker.
- Long-running asynchronous tasks.
- Multi-session orchestration: you ask "analyze Google and Microsoft," and a custom tool fans out one session per company. Each of those sessions has its own sub-agents, its own outcome definition for self-supervision, and shared memory stores.
- Deployments: recurring sessions on a schedule, with an agent definition, initial messages and resources like memory stores, repos or files.
Step 5 is the one to study. The harness gives you sessions; your own code, exposed to the agent as a custom tool, decides how to split work across sessions. That is a clean division of labor: Anthropic runs the loop, you own the orchestration logic. If you want the scheduling comparison, see Claude Code routines vs Managed Agents schedules.
Dreaming, Shown Live#
Part 3 includes a preview of dreaming. You pick a memory store, a model and optional instructions, and point it at a window of past sessions (the demo used 30 days). It spins up a Managed Agents session that uses sub-agents to read the transcripts and asks whether the memory store captured what was needed, which sessions hit problems, and whether a lesson repeated.
In the demo it found gaps in the SEC skill the team had written and added the missing knowledge to the memory store. Today dreaming only updates memory stores. The team said they want to extend it to skills, agent prompts and sub-agent prompts, which would turn it into a general self-improvement loop. More on the feature in our post on dreaming and outcomes.
The Q&A Details Worth Knowing#
The questions surfaced several practical facts that are hard to find elsewhere:
- Session length. Compaction is managed for you. The team said they have seen 10-hour sessions in production. For long runs, the outcomes system is the recommended tool: define an exit criterion and Claude iterates until it meets the rubric.
- Progress updates. There is an events API on each session. For human-friendly checkpoints, define a custom tool like "update status" and let Claude call it when it makes progress.
- Messages during a custom tool call. If the agent is waiting on your custom tool result, a new message returns a 400, to preserve ordering. The workaround: put the custom tool on a sub-agent, so the coordinator stays free to receive messages while the sub-agent waits.
- Graders and sub-agents. Outcomes are defined at the session level. There is no per-sub-agent outcome yet.
- Memory scoping. You can attach multiple memory stores to one session, for example a per-user store and an org-wide store.
- Private data. Connect over MCP with credentials in the vault, use MCP Tunnels to avoid exposing an MCP server to the internet, or bring a self-hosted sandbox peered with your network.
- Observability. You get every event, including model-call start and end times, through the API. There is no built-in OpenTelemetry export; you build the connector.
- CI/CD. The
antCLI wraps the API and accepts YAML, so you can check agent definitions into your repo and apply them Terraform-style from CI. - Access control. Resources are scoped to a workspace. Admins design workspaces around who should see what. There are no fine-grained per-resource sharing controls.
- On-prem. A frequent enterprise ask that the team said it is seriously considering, with nothing to announce.
- Evals. Internally they spin up thousands of parallel sessions per model release to decide which harness assumptions to remove. Their advice for your own evals: start from high-quality data, often your historical sessions, because "you get 100%, but what does that mean" is a common trap.
Managed Agents or Cowork?#
One attendee asked when a team using Claude Cowork should move to Managed Agents. Phatak's answer is a good rule of thumb: Cowork is for personal agents. Managed Agents is for agents that serve a team, an organization or your end customers. If you are comfortable in Claude Code, there is a Managed Agents skill that walks you through building one in natural language. Notion's external agents and Atlassian's Jira integrations were cited as production examples.
Our Take#
The most valuable idea in this workshop is not an API. It is the admission that the first design was a pet, and the discipline of rebuilding so that every component is cattle. If you are rolling your own harness, audit it the same way: which single process, if it died at hour seven, would take the session with it?
The weakest spot is the one the team was candid about: sharing and access control are coarse, and observability is bring-your-own. For a single product team that is fine. For a large enterprise with many departments, expect to build some glue. Our honest review and the Managed Agents vs LangGraph vs DIY comparison go deeper on that tradeoff.
FAQ#
How long can a Claude Managed Agents session run?#
The team said compaction is handled for you and they have seen 10-hour sessions in production. For long tasks they recommend the outcomes feature, which keeps the agent iterating until an exit criterion is met.
Can I send a message while a Managed Agent waits on a custom tool?#
No. That returns a 400 to keep event ordering intact. Put the custom tool on a sub-agent so the coordinator agent stays free to receive messages.
How do I version Managed Agents configs?#
Use the ant CLI, which wraps the API and accepts YAML definitions you can keep in your repo and apply from CI.
Sources#
- Workshop videos: Part 1, Part 2, Part 3, Part 4
- Scaling Managed Agents: Decoupling the brain from the hands - Anthropic Engineering
- New in Claude Managed Agents: dreaming and outcomes
The Full Series#
This post is part of our coverage of Anthropic's talks at AI Engineer 2026:
- Claude for Long-Horizon Tasks: Lance Martin's Four Rules for Agents That Run for Hours
- How Anthropic Builds: Mike Krieger on Being Unreasonable With Claude
- How Jarred Sumner Ships Millions of Lines of Agent-Written Code
- A Field Guide to Fable: Thariq Shihipar on Unhobbling Claude and Finding Your Unknowns
- Claude Tag Lands 65% of Anthropic's Product PRs: Takeaways From Cat Wu and Thariq Shihipar
- 1,000 Claude Agents, Git and a Database: How Fable 5.2 Formalized Fermat Without a Custom Harness
- Your Old Prompts Are Making Claude Worse: Lance Martin's Checklist for Frontier Models
- Why One Agent Isn't Enough: Anthropic on Flows, UltraCode and Running 1,000 Agents
- Tokens Should Have Jobs: Anthropic's Case for Advisors, Graders and Dreamers
- Give the Agent a Budget, Not a Token: Anthropic's CI Team on Safe Agent Permissions
- Rethinking Claude Code Best Practices: Lydia Hallie on Getting Out of the Loop Safely
- How Anthropic Merges 30,000 Code Changes a Day: Addy Osmani on Verifying the Software Factory
- Using LLMs to Secure Source Code: Eugene Yan's Six-Step Pipeline From Anthropic
- From Messages API to Managed Agents: Anthropic's Applied AI Team on Harnesses That Go Stale
- Forward Deployed Engineering 101: When Your AI Startup Needs FDEs, From Palantir to Anthropic
- The Enterprise Tech Stack for AI Agents: Why Your POC Stalls and How to Design Past It
- The Claude Certified Architect Exam as a Field Guide to Agentic Engineering
- The Future of MCP: David Soria Parra on Connectivity, Progressive Discovery and Skills Over MCP
- Gateways Are All You Need: How Anthropic Thinks About MCP in the Enterprise
- How to Build Agents That Run for Hours: Anthropic's Planner, Generator and Evaluator Harness
Continue Reading#
Get the next deep dive like this in your inbox
One email a week on Anthropic and the rest of the AI dev stack. Free.
Read next on Claude Code
Claude for Long-Horizon Tasks: Lance Martin's Four Rules for Agents That Run for Hours
Lance Martin of Anthropic on building long-horizon agents: decouple the brain from the hands, verify in a separate context, dream to fix memory, and go org-level.
9 min readClaude Managed Agents Public Beta: What's Actually Available vs What's Gated
Claude Managed Agents public beta reviewed: what ships today, which orchestration features are gated behind a research preview, what it costs, and when to DIY.
8 min readManaged Agents vs LangGraph vs Rolling Your Own: Who Should Run Your Agent Loop in 2026
Managed agents vs LangGraph vs a DIY while-loop - compare state, sandboxing, cost, lock-in and compliance to decide who should run your agent loop in 2026.
9 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.







