CLAUDE LABJP
FORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as OctoberFORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as October
Articles/API & SDK
API & SDK/2026-04-09Intermediate

Claude Managed Agents: Anthropic's New Agent Infrastructure (April 2026)

Anthropic launched Claude Managed Agents in public beta on April 8, 2026. This guide covers everything: sandboxed execution, authentication, checkpoints, scoped permissions, pricing, and how to get started building production-ready AI agents 10x faster.

managed-agents5claude-api81agent13enterprise5api38202616

On April 8, 2026, Anthropic launched Claude Managed Agents into public beta — a composable API suite that promises to get AI agents into production ten times faster than building everything from scratch. If you've ever spent weeks wiring together agent loops, sandboxed execution environments, session management, and authentication layers, this is the announcement you've been waiting for.

What follows separates the service from the existing Agent SDK, walks a working code example end to end, and looks closely at how the pricing behaves once an agent runs for hours rather than seconds.

What Are Claude Managed Agents?

Claude Managed Agents is a hosted agent infrastructure service built on top of Claude models and available on the Claude Platform. Instead of building and maintaining your own agent runtime, Anthropic handles the heavy lifting:

  • Secure sandboxed execution: Claude can read files, run shell commands, execute code, and browse the web — all inside isolated, per-session environments
  • Authentication management: OAuth flows and credential handling for connecting to external services
  • Checkpointing: Save agent state mid-task so long-running sessions can be paused and resumed even after network interruptions
  • Scoped permissions: Define exactly what your agent is allowed to do before it runs — no open-ended access
  • Persistent long-running sessions: Tasks that take hours can run autonomously, with outputs persisted even through disconnections

The value proposition is clear: you get production-grade agent infrastructure on day one, without needing to design, build, or maintain it yourself. Anthropic provides the "hands" so you can focus on the "brain."

Key Capabilities in Depth

Sandboxed Code Execution

One of the most compelling features is true sandboxed execution. Claude doesn't just generate code — it can run it, observe the output, and iterate based on results. Each session runs in its own isolated environment, meaning there's no risk of one agent's actions bleeding into another's. Supported runtimes include Python, Node.js, and shell scripting.

Long Sessions with Automatic Checkpoint Recovery

Typical API interactions are request/response cycles measured in seconds. Managed Agents is designed for tasks measured in minutes to hours. If a network connection drops mid-task, the agent resumes from the last checkpoint rather than starting over. This makes it practical to hand off complex, multi-step workflows — like processing a large dataset, generating a full report, or running an iterative code review — and trust that they'll complete.

Scoped Permissions for Safety

Enterprise deployments require tight control over what AI can do. With Managed Agents, you define permissions upfront:

  • Which directories the agent can read from or write to
  • Which commands it can execute
  • Which external services (if any) it can reach

Following the principle of least privilege is straightforward because permissions are declared at session creation time, not inferred at runtime.

Claude Managed Agents vs. the Agent SDK

It's worth being clear about how Managed Agents relates to the existing Claude Agent SDK, since both are designed for building agent systems.

The Claude Agent SDK is designed for developers who need full control. You own the infrastructure, the agent loop, and the execution environment. This makes it ideal when you're integrating deeply with existing systems, have specialized hosting requirements, or need custom tooling that doesn't fit a managed model.

Claude Managed Agents trades that flexibility for speed and simplicity. Anthropic manages the runtime, so you don't have to. It's the right choice when:

  • You need to go from prototype to production quickly
  • Your tasks require long-running, autonomous execution
  • You want sandboxed code execution without building your own container infrastructure

The two approaches aren't mutually exclusive. A team might use the Agent SDK for a core product built on proprietary infrastructure, and Managed Agents for internal tooling or rapid experimentation. For a deep dive into building production multi-agent systems with the Agent SDK, see Building a Production Multi-Agent System with Claude Agent SDK.

Getting Started: Basic Implementation

Prerequisites

  • Anthropic API key (registered on Claude Platform)
  • Python 3.9+ or Node.js 18+
  • Latest anthropic SDK: pip install anthropic --upgrade

Creating Your First Managed Agent Session (Python)

import anthropic
 
# Initialize the client
client = anthropic.Anthropic(api_key="YOUR_API_KEY")
 
# Create a Managed Agent session with sandboxed execution
session = client.managed_agents.sessions.create(
    model="claude-sonnet-4-6",
    # Enable sandboxed computer use tools
    tools=[{
        "type": "computer_20250124",
        "name": "computer",
        "display_width_px": 1024,
        "display_height_px": 768
    }],
    # Define scoped permissions — minimal access by design
    permissions={
        "file_system": {
            "read": True,
            "write": True,
            "scope": "/workspace"      # Restrict to /workspace only
        },
        "shell": {
            "enabled": True,
            "allowed_commands": ["python", "node", "npm"]  # Whitelist commands
        },
    },
    max_duration_minutes=60,           # Hard cap on session length
)
 
print(f"Session ID: {session.id}")
print(f"Status: {session.status}")
 
# Give the agent a task
result = client.managed_agents.sessions.messages.create(
    session_id=session.id,
    messages=[{
        "role": "user",
        "content": (
            "Load sales_data.csv, calculate monthly totals and year-over-year growth, "
            "then save a summary report to report.md."
        )
    }]
)
 
# Stream the agent's progress in real time
for event in result:
    if event.type == "content_block_delta":
        print(event.delta.text, end="", flush=True)
    elif event.type == "session_checkpoint":
        print(f"\n[Checkpoint saved: {event.checkpoint_id}]")
 
# Terminate when done to avoid unnecessary session-hour charges
client.managed_agents.sessions.terminate(session_id=session.id)
# Expected output
Session ID: sess_01AbCdEfGhIjKlMn
Status: active
[Loaded sales_data.csv: 1,234 rows]
[Calculating monthly totals...]
[Checkpoint saved: chk_XyZ789]
[report.md created: Total revenue $2,345,678 | YoY growth +15.2%]

The key detail to notice is the permissions block. The agent can only read/write files under /workspace and can only run three specific commands. This follows the principle of least privilege — something particularly important when an agent can actually execute code. For a broader look at securing API-based production systems, Claude API Production Security Complete Guide covers the full picture.

Resuming from a Checkpoint

When a long-running task is interrupted, pick up exactly where it left off:

# Resume from a saved checkpoint ID
resumed = client.managed_agents.sessions.resume(
    checkpoint_id="chk_XyZ789"
)
 
print(f"Resumed session: {resumed.id}")
print(f"Restored state: {resumed.state_summary}")
 
# Continue the task
result = client.managed_agents.sessions.messages.create(
    session_id=resumed.id,
    messages=[{
        "role": "user",
        "content": "Great — now add a visualization section with monthly bar charts."
    }]
)

This pattern is especially useful for batch processing jobs, overnight research tasks, or any workflow that's too long to guarantee uninterrupted network connectivity.

Pricing: What to Expect

Claude Managed Agents pricing has two components:

  • Token consumption: Standard Claude model pricing applies (same as the regular Messages API)
  • Active runtime: $0.08 per session-hour while the session is actively processing

Idle time — when the agent is waiting for your input — is not billed at the session-hour rate. A one-hour autonomous task running Claude Sonnet 4.6 would cost token fees plus $0.08.

A few practical ways to keep costs in check:

Right-size your model choice: Use Claude Haiku 4.5 for simpler, structured tasks. Reserve Sonnet 4.6 or Opus 4.6 for tasks that genuinely need deep reasoning.

Set a hard session cap: The max_duration_minutes parameter acts as a cost ceiling — useful during development when you don't want runaway sessions.

Terminate promptly: Call sessions.terminate() as soon as the task completes rather than letting the session time out naturally.

Split large tasks: Break very long workflows into chunks using checkpoints, creating a fresh session for each chunk. This also makes error recovery easier.

Features Still in Research Preview

Several capabilities are currently in a limited research preview and not yet available to all developers:

  • Advanced memory tooling: Agents that remember context across separate sessions and use it to personalize behavior over time
  • Multi-agent orchestration: Multiple specialized agents working in parallel under a coordinator
  • Self-evaluation and iteration: Agents that assess their own output against a success criterion and retry until the goal is met

These are the features that will likely push the ceiling for what autonomous AI can accomplish. Keep an eye on Anthropic's engineering blog for updates on when they move to public availability.

Looking back

Claude Managed Agents fundamentally lowers the barrier to running capable AI agents in production. The combination of secure sandboxed execution, automatic checkpointing, and scoped permissions addresses the three biggest engineering challenges in agent deployment — all without requiring you to build or maintain any of that infrastructure yourself.

The public beta is the right time to experiment with your own workflows. Identify a task that currently requires hours of manual work, define the right permissions scope, and let an agent take a first pass. The iteration cycle from that point is much faster than building from the ground up.

As the research preview features — multi-agent orchestration, long-term memory, and self-evaluation — move toward general availability, the range of viable use cases will expand substantially. For anyone serious about production AI agents in 2026, this is a platform worth watching closely.

Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

API & SDK2026-04-10
Designing Production Architecture for Claude Managed Agents — Sandboxed Execution, Persistent Memory, Credential Management, and Cost Optimization Patterns
A practical guide to designing production-grade architectures with Claude Managed Agents. Covers sandboxed execution, persistent memory, credential management, multi-agent orchestration, and cost optimization.
API & SDK2026-07-09
Same Output, Different Path — Guarding Agent Trajectories with Invariants
When the default model changes, your final output can stay correct while the path your agent takes quietly shifts. Here is a trajectory regression harness built on recorded tool traces and deterministic invariants, with working code and measured numbers.
API & SDK2026-06-29
When Context Editing Made My Agent Re-run the Same Search — Field Notes on Clear Boundaries and Cache Invalidation
After turning on Context Editing to auto-clear tool results, the agent forgot what it had just read, re-ran the same tool, and the cache rebuilt every turn so costs went up. Field notes on instrumenting the silent regression and setting trigger, keep, and clear_at_least from measured data.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →