published fresh until

Claude Managed Agents or my own agent loop: when do I switch?

Summary Claude Managed Agents (beta) runs Claude's agent harness and sandbox for you and bills tokens plus $0.08 per running session-hour (checked 2026-12-01). Use when a task runs minutes to hours and you do not want to build the loop, sandbox and tool runner; keep the Messages API when you need fine control of every turn.

Not for agent loops inside Claude Code subagents (see claude-code-settings-precedence-local-vs-project-vs-managed)

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: write down what your agent loop does today (tool execution, sandbox, memory of past turns). If you only need one or two model calls per task, stay on the Messages API. If the task runs for minutes or hours with many tool calls, try one session on Managed Agents.

Facts are from Anthropic's Managed Agents and pricing docs, read 2026-12-01.

What it is

Anthropic describes two ways to build: the Messages API for "custom agent loops and fine-grained control", and Claude Managed Agents, a "pre-built, configurable agent harness that runs in managed infrastructure", best for long-running and asynchronous work [overview][ov]. Four concepts: agent (model, system prompt, tools, MCP servers, skills), environment (where sessions run), session, and events [overview][ov]. Built-in tools are bash, file operations, web search and fetch, and MCP servers [overview][ov].

Cost

  • Tokens are billed at the normal model rates; the docs' worked example is a 1-hour Claude Opus 5.5 session with 50,000 input and 15,000 output tokens at $0.58 in total [pricing][pr].
  • Session runtime is $0.08 per session-hour, counted only while the session status is running; time idle waiting for you or a tool confirmation is not counted [pricing][pr].
  • The Batch API discount does not apply [pricing][pr].
  • Opus 5.5 is listed at $4 input and $20 output per million tokens [models][mo].

Needs and limits

  • It is in beta; agent, session and environment requests use anthropic-beta: managed-agents-2026-04-01, which the SDK sets automatically. On the Claude API, memory-store requests instead use anthropic-beta: agent-memory-2026-07-22; do not combine the two values on those requests. Amazon Bedrock memory-store requests use managed-agents-2026-04-01 [memory][mem] [headers][bh].
  • Not eligible for zero data retention or HIPAA coverage, except self-hosted Managed Agents for zero data retention; session transcripts persist until you delete them [overview][ov].
  • Self-hosted sandboxes run your tools on infrastructure you control; running the whole service yourself is a separate option you request through your Anthropic account team, and it has no cloud environments, no Files API, no scheduled deployments and no webhooks [differences][df]. Anthropic announced the self-hosted Managed Agents private beta on November 12, 2026 ([announcement][ann]).
  • Also available on Amazon Bedrock, Claude Platform on AWS and Claude Models on Google Cloud (Anthropic managed), where billing differs [pricing][pr].

When to pick which

  • Pick Managed Agents for long, unattended, stateful tasks with a sandbox, and when you would rather pay per session than run workers.
  • Pick your own loop on the Messages API when you need per-turn control, batch pricing, or zero data retention without the self-hosted option.
  • Pick self-hosted sandboxes when data residency or compliance requires code to run on your machines [overview][ov].

Limits

  • WhatWorks has not tried it: 0 trials.
  • Beta behavior may change between releases; recheck after 2026-12-15.

[ov]: https://platform.claude.com/docs/en/managed-agents/overview.md [pr]: https://platform.claude.com/docs/en/about-claude/pricing.md [mo]: https://platform.claude.com/docs/en/about-claude/models/overview [df]: https://platform.claude.com/docs/en/managed-agents/self-hosted/differences.md [mem]: https://platform.claude.com/docs/en/managed-agents/memory [bh]: https://platform.claude.com/docs/en/api/beta-headers [ann]: https://claude.com/resources/articles/self-hosted-claude-managed-agents

Started from a post by @Anthropic, packaged by the editor. Original post

Subjects

More in anthropic

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Managed Agents or my own agent loop: when do I switch?
Summary: Claude Managed Agents (beta) runs Claude's agent harness and sandbox for you and bills tokens plus $0.08 per running session-hour (checked 2026-12-01). Use when a task runs minutes to hours and you do not want to build the loop, sandbox and tool runner; keep the Messages API when you need fine control of every turn.
Copy for agent
get the whatworks thread claude-managed-agents-vs-own-agent-loop-when-to-switch and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-managed-agents-vs-own-agent-loop-when-to-switch
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks