← Blog
ClaudeAI agentsSandboxes

Claude Managed Agents: pricing, limits and when to self-host

Yura Dubinin
Yura Dubinin

Claude Managed Agents is Anthropic's hosted service for running Claude as an autonomous agent: Anthropic runs the agent loop, the tools and a cloud sandbox, and your application sends events and reads the results. It costs the normal token price of the model plus $0.08 per session-hour, counted only while the session is running (Anthropic pricing, checked 15 November 2026). The service is in beta, and its cloud sandbox is a Linux container with up to 8 GB of memory and 10 GB of disk.

If you want the agent in an environment you control, run the Claude Agent SDK in your own sandbox. Lizard (lizard.build) runs Lizard Sandboxes as Firecracker microVMs, and one command starts a Small one with Claude Code and Node.js installed: lizard sandbox create -t claude -s small --timeout 600000. A Small sandbox costs $0.0162 per hour, billed per second. Session runtime is about 2 to 3% of the bill in the two worked examples below, so the choice turns on control of the machine, the data and the run length.

What are Claude Managed Agents?

Claude Managed Agents is a pre-built agent harness that runs on Anthropic's infrastructure. Anthropic's overview describes it as the alternative to the Messages API for "long-running tasks and asynchronous work": you skip writing the agent loop, the tool execution layer and the runtime, and Claude reads files, runs shell commands, searches the web and runs code inside a sandbox Anthropic provides.

Anthropic launched it as a public beta in April 2026. On 15 November 2026 the docs still mark it as beta on every model and on all three places it runs: the Claude API, Claude Platform on AWS, and Claude Models on Google Cloud (Anthropic managed). Every request needs the managed-agents-2026-04-01 beta header, which the SDKs set for you. Access is on by default for all API accounts.

The Claude Agent SDK is the other route: a library that runs the same kind of agent loop inside your own process, on a machine you pick. Managed Agents moves that loop to Anthropic and puts a REST API over it.

How does a Managed Agents session work?

A Managed Agents session is one running agent inside one environment, and you drive it with events. The docs build the service on four concepts:

ConceptWhat it holds
AgentThe model, system prompt, tools, MCP servers and skills. You create it once and reuse its ID.
EnvironmentWhere tools and code run: an Anthropic-managed cloud sandbox, or a self-hosted sandbox on your infrastructure.
SessionA running agent instance in an environment, working on one task.
EventsThe messages between your application and the agent: user turns, tool results, status updates.

You create an agent and an environment, start a session that references both, then send user messages as events. Claude runs tools on its own and streams results back over server-sent events. You can send more events to steer the agent while it works, or interrupt it. Anthropic keeps the event history and you can fetch all of it.

A session moves between four statuses: running, idle, rescheduling and terminated. A session that finishes its work goes idle, so it can take another message later with its files and history intact (session operations).

The built-in tools are Bash, file operations, web search and web fetch, plus any MCP servers you connect. Each cloud session runs in an isolated Ubuntu 24.04 container with Python, Node.js, Go, Rust, Java, PostgreSQL 16 and Redis 7 installed (cloud sandbox reference).

How much do Claude Managed Agents cost?

Claude Managed Agents is billed on two dimensions: tokens at the standard model rates, and session runtime at $0.08 per session-hour. All prices below are in USD, from Anthropic's pricing page on 15 November 2026.

Line itemPriceHow it is counted
TokensThe model's standard rate. Claude Sonnet 5.5: $2 per million input tokens, $10 per million output. Claude Opus 5.5: $4 and $20.Every token the session uses. Prompt caching multipliers apply as on the Messages API.
Session runtime$0.08 per session-hourMeasured to the millisecond, only while the status is running. Time spent idle, rescheduling or terminated is not billed.
Web search$10 per 1,000 searchesEach search made inside a session.
US-only inference1.1x token ratesWhen the agent's model.inference_geo is set to "us".
Batch API discountNot availableSessions are stateful, so there is no batch mode.
Self-hosted Managed AgentsNot publishedAnthropic says to contact your account team.

Runtime billing replaces the container-hour charge of the code execution tool, so you are not billed for the container on top of the $0.08.

Example 1: a 10-minute task on Claude Sonnet 5.5

The token counts in both examples are our assumptions for a coding task with prompt caching on. Nobody measured them, so check your own sessions' usage before you budget.

Line itemCalculationCost
Uncached input30,000 × $2 / 1,000,000$0.0600
Cache writes (5 minutes)70,000 × $2.50 / 1,000,000$0.1750
Cache reads600,000 × $0.10 / 1,000,000$0.0600
Output12,000 × $10 / 1,000,000$0.1200
Session runtime10 / 60 hour × $0.08$0.0133
Total$0.4283

Runtime is $0.0133 of $0.4283, about 3% of the bill.

Example 2: a 2-hour task on Claude Opus 5.5

Line itemCalculationCost
Uncached input200,000 × $4 / 1,000,000$0.80
Cache writes (5 minutes)600,000 × $5 / 1,000,000$3.00
Cache reads8,000,000 × $0.20 / 1,000,000$1.60
Output150,000 × $20 / 1,000,000$3.00
Session runtime2 hours × $0.08$0.16
Total$8.56

Runtime is $0.16 of $8.56, under 2%. To cap a session, set a budget when you create it: the session stops sending model requests once its cost at list prices reaches max_list_cost (session budgets).

What are the limits of Claude Managed Agents?

The main limits of Claude Managed Agents on 15 November 2026 are its beta status, a cloud sandbox capped at 8 GB of memory and 10 GB of disk, and no eligibility for Zero Data Retention or a HIPAA Business Associate Agreement.

LimitValueSource
StatusBeta. Anthropic "might refine behaviors between releases".Overview
Cloud sandboxLinux container, Ubuntu 24.04, x86_64, up to 8 GB memory, up to 10 GB diskCloud sandbox reference
NetworkA sandbox created through the API has unrestricted networking unless you set limited with an allowed_hosts listEnvironments
Rate limits300 create requests and 1,200 read requests per minute for each organization, plus your usage-tier limitsReference
DataNot eligible for Zero Data Retention (except the fully self-hosted service) or HIPAA. Transcripts persist until you delete the session.Overview
Sub-agentsAt most 25 child threads in a session at a time, one level of delegationSession threads, multiagent orchestration
CloudsNot available on partner-operated platforms such as Amazon BedrockPricing
Session lengthNo maximum is published in the pages listed hereChecked 15 November 2026

The network default is open: an API create request that leaves out networking gets unrestricted, while the Claude Console form starts on Limited. The docs do not state the sandbox's CPU count, so test a build that needs many cores before you commit.

Managed Agents has a middle option for data that cannot leave your network. With a self-hosted sandbox, a worker program on your machines runs the agent's bash and file tools, and the files stay with you. Anthropic still runs the loop, and the conversation history and every tool result still go to its service. Running the whole service yourself is possible only by request through an Anthropic account team.

Managed Agents or the Agent SDK on your own sandbox?

Choose Managed Agents when you want Anthropic to run the agent loop and keep the session state. Choose the Agent SDK on your own sandbox when you need to control the machine, the files, the network and how long everything lives. The two differ by cents in compute cost.

Claude Managed Agents (cloud sandbox)Agent SDK in a Lizard sandbox
Who runs the agent loopAnthropicYour code. The SDK starts a claude CLI subprocess.
Where code runsA container on Anthropic's infrastructureA Firecracker microVM with its own kernel
MachineUp to 8 GB memory, 10 GB disk, CPU not statedSmall: 2 vCPU, 4 GB RAM, 20 GB disk. Large: 8 vCPU, 16 GB RAM, 80 GB disk.
Session historyStored by Anthropic until you delete itJSONL files on the sandbox disk, or your own store
Zero Data RetentionNot eligibleDepends on your own agreement with Anthropic for API calls
Longest runNot publishedUp to 596 hours on a paid plan, 1 hour during the trial
Compute price$0.08 per hour while running$0.0162 per hour (Small) from create to pause or delete, idle time included
What you operateNothingThe sandbox lifecycle, credentials, state and cleanup

Prices: Anthropic and Lizard pricing, both checked 15 November 2026.

The same two tasks with self-hosted compute, assuming the same token use and an Anthropic API key at the same model rates:

TaskTokensManaged Agents runtimeLizard Small computeDifference
10 minutes, Sonnet 5.5$0.4150$0.013310 / 60 × $0.0162 = $0.0027$0.0106
2 hours, Opus 5.5$8.40$0.162 × $0.0162 = $0.0324$0.1276

The sandbox is cheaper per hour, and the saving is one cent on the short task and 13 cents on the long one. The meters also work differently. Managed Agents stops billing when a session goes idle. A sandbox bills while it exists, so a self-hosted agent that waits an hour for a human costs an hour of compute unless you pause it. A paused Lizard sandbox has no compute charge and costs $0.14 per GB-month for the disk space it uses. A pause keeps files only: processes end, and the resume boots fresh.

Anthropic's Agent SDK hosting guide says the same about cost: token spend "typically dominates container infrastructure cost by an order of magnitude or more". It suggests 1 GiB of RAM, 5 GiB of disk and 1 CPU per agent as a starting point.

Decide on the other rows of the table. Managed Agents fits a team that wants an agent in production without building session storage, streaming and recovery. Self-hosting fits when the task needs more than 10 GB of disk, a known CPU count, a private network, data that must stay off a third party's session store, or a saved snapshot the agent starts from each time. Self-hosting has its own work: the hosting guide warns that transcripts and working files on local disk are lost with the container unless you persist them.

AWS sells a comparable managed runtime; see Amazon Bedrock AgentCore pricing.

How do you run the Agent SDK in a Lizard sandbox?

Create a sandbox from the claude template, install the SDK, and run your script with an Anthropic API key. We ran these steps on 15 November 2026 with Lizard CLI 4.0.128.

lizard sandbox create -t claude -s small --timeout 600000 --json
SB=YOUR_SANDBOX_ID
lizard sandbox exec "$SB" -- sh -c 'mkdir -p /workspace/agent && cd /workspace/agent && npm init -y && npm install @anthropic-ai/claude-agent-sdk'

The create call returned a running Small microVM in us-east-1 with "pricePerHour": 0.0162. The --timeout 600000 gives it 10 minutes; without the flag a sandbox lives 5 minutes. Without -s small, a paid account gets a Medium at $0.0324 per hour. Inside we found Node.js 22.23.2 and Claude Code 2.1.286, and npm installed @anthropic-ai/claude-agent-sdk 0.3.325.

Save a one-shot runner as task.mjs. It follows the ephemeral pattern from Anthropic's hosting guide:

import { query } from "@anthropic-ai/claude-agent-sdk";

for await (const message of query({
  prompt: process.env.TASK_PROMPT,
  options: { cwd: "/workspace/agent", maxTurns: 20 },
})) {
  if (message.type === "result") console.log(message.subtype, message.result);
}

Upload it, then run it from a shell inside the sandbox, which keeps the key out of your local shell history:

lizard sandbox files put "$SB" ./task.mjs /workspace/agent/task.mjs
lizard sandbox shell "$SB"
# inside the sandbox:
cd /workspace/agent
read -rsp 'Anthropic API key: ' ANTHROPIC_API_KEY && export ANTHROPIC_API_KEY
TASK_PROMPT="List the files here and say what each one does." node task.mjs

We uploaded the file and started the script with lizard sandbox exec. Without ANTHROPIC_API_KEY it exits with status 1 and the message "Not logged in · Please run /login": the SDK reaches the claude CLI and stops at authentication. We did not run it with a paid API key, and we did not open the interactive shell in this test.

If you want Claude Code itself instead of your own SDK code, the sandbox can run it on the Claude sign-in connected to its project:

lizard sandbox prompt "$SB" --agent claude "Create fizz.py that prints FizzBuzz for 1 to 15, run it, and reply with the last line."
lizard sandbox rm "$SB"

We tested this agent step through the Lizard API, which lizard sandbox prompt calls, and checked the CLI flags with --help. The agent wrote the file, ran it and answered "FizzBuzz" in about 4 seconds.

Runs longer than 1 hour need a paid plan: during the 7-day trial every sandbox is deleted 1 hour after it starts at the latest, and one Small runs at a time. Lizard Pro is $19 a month, taxes included, with $19 of usage included.

The full setup, with tool allowlists, credentials and state, is in Claude Agent SDK sandbox. For non-interactive runs see Claude Code headless, for agents that work for hours see background coding agents, and the docs page is Run Claude Code in a sandbox.

FAQ

Are Claude Managed Agents free? No. A session is billed for its tokens at the model's standard rate plus $0.08 per session-hour while it is running. Idle time is not billed. Source: Anthropic's pricing page, checked 15 November 2026.

Is Claude Managed Agents generally available? No. On 15 November 2026 Anthropic's docs list it as beta on the Claude API, Claude Platform on AWS and Claude Models on Google Cloud (Anthropic managed).

What is the difference between Claude Managed Agents and Claude Code? Claude Code is a coding agent you run yourself in a terminal or an IDE. Claude Managed Agents is an API service where Anthropic hosts the agent loop and a sandbox for your application.

What is the difference between Managed Agents and the Agent SDK? With Managed Agents, Anthropic runs the loop and stores the session. With the Agent SDK, your code runs the loop as a claude CLI subprocess on a host you choose, and you own the state and the isolation.

Can Claude Managed Agents run on my own infrastructure? Partly. A self-hosted sandbox runs the agent's bash and file tools on your machines while Anthropic runs the loop and keeps the conversation history.

How long can a Managed Agents session run? Anthropic's docs say it is built for tasks that take "minutes or hours" and publish no maximum that we could find on 15 November 2026. Sessions that finish go idle and can be resumed with a new message.

How much does it cost to self-host the Agent SDK? You pay Anthropic for tokens and your host for compute. Anthropic's hosting guide puts a minimal container at roughly $0.05 per hour. A Lizard Small sandbox with 2 vCPU and 4 GB of RAM is $0.0162 per hour, billed per second, when created with -s small.

Build with AI. Ship with Lizard

You don't need a platform team to go live. Your whole cloud, one CLI command away.

Start 7-day trial
Services
—
Add-ons
—
Deployments
—
Sandbox starts
—

We use cookies for essential site functionality and analytics. See our Cookie Policy.