Regulated banks, defense suppliers, and multi-plant manufacturers routinely ask how to run frontier agent loops without storing session histories on vendor clouds. Anthropic's answer is self-hosted Claude Managed Agents, an access-gated deployment option where both the orchestration service and the tool execution sandboxes run inside your own cloud account or on-premise data center. Before your infrastructure team provisions hardware, it pays to read the operator contract closely: what moves inside your firewall, what you suddenly become responsible for securing, and which data still crosses your network perimeter on every turn.
Cloud sandboxes, self-hosted sandboxes, or full self-hosted Managed Agents?
Anthropic divides Managed Agents into three layers (sandboxes, orchestration service, and model inference) and offers three hosting splits:
- Cloud sandboxes (default): Anthropic runs the tool containers, the agent loop, session storage, and model inference.
- Self-hosted sandboxes: only tool execution moves inside your network so commands touch internal systems locally, while Anthropic still hosts the session database and orchestration loop (distinct from the laptop-resident VM architecture we examine in Claude Cowork VM, DXT extensions, and MCP tool cache limits).
- Self-hosted Claude Managed Agents: you operate the
cma-serverbinary, aPostgreSQL 16+state database (running without PostgreSQL keeps state in RAM and wipes everything on restart), polling workers (ant beta:workeror SDK workers), an SSO-backed web console, and thecma-server-adminCLI, while routing model calls to Anthropic, Amazon Bedrock, Google Cloud, Microsoft Foundry, or an internal model gateway.
Four security realities inside the operator contract
Bringing cma-server in-house shifts every operational duty we reviewed in an MCP security checklist for enterprise IT onto your own engineering team, alongside the bot-identity challenges covered in Nous Hermes Agent for enterprise bots: patterns and risks:
- The worker process does not isolate bash: while
cma-servernever touches a shell, the worker'sbashtool executes with the worker process's exact OS permissions and network reach. Real isolation comes only from wrapping each session's worker in a disposable container, VM, or thecma-sandboxesHelm pod. - Three separate credentials enforce least privilege: applications hold the Server API key, only
cma-serverholds the Inference credential, and polling workers hold an Environment key scoped to a single work queue. - Each trust zone requires a separate deployment: rather than sharing one server across conflicting security tiers, Anthropic's multitenancy rules call for distinct deployments per trust boundary.
- Self-hosting does not keep prompts or tool results off the wire: on every model turn,
cma-serversends the running conversation history, including tool inputs and returned ERP rows, to your configured inference provider, plus session, agent, and environment IDs when calling the Claude API.
Why self-hosted agent infrastructure still needs an enterprise ontology
- Minimize what crosses the inference boundary: instead of dumping raw database tables containing national IDs or payroll columns into tool results that travel to a cloud model endpoint, place an enterprise business ontology in front of your databases to enforce row-level permissions, field masking, and concise semantic objects.
- Export OpenTelemetry traces and gate every write: pair
W3C traceparentspans acrosscma-serverand MCP tools with deterministic schema validation and human-in-the-loop approval before any ERP or financial mutation executes.