Anthropic opened a private beta for self-hosted Claude Managed Agents on 12 November 2026, and it changes the way serious teams should think about prompting. Until now, Managed Agents ran entirely on Anthropic's infrastructure. Now the whole service — the agent harness, the sandboxes, the credentials and the session history — can live inside your own cloud account or data centre. The model itself still runs elsewhere, but everything around it is yours. That shift makes the prompt the real control surface: what you tell the agent, how tightly you scope it and what you forbid it from touching now decides whether a self-hosted agent is a productivity win or a security incident waiting to happen.
This guide gives you 20 copy-paste Claude Managed Agents prompts for the jobs these agents actually do: fixing broken builds, testing releases, triaging alerts and chewing through bug backlogs. Each prompt is written for the self-hosted setup, with the guardrails that matter when the agent runs inside your perimeter baked in. Use them in the Claude SDK or the ant CLI against your own cma-server, and adapt the placeholders in square brackets to your repository, your tools and your team's rules.
What Are Claude Managed Agents?
Claude Managed Agents is the service Anthropic uses to host autonomous Claude agents that work through long jobs on their own. Anthropic launched it as a fully managed, hosted service in April 2026, with secure sandboxing, built-in tools and streaming so an agent could keep working on a task for hours without a human watching every step. On 19 May 2026, Anthropic added self-hosted sandboxes, which let the isolated environment where an agent's code runs move onto the customer's own infrastructure while Anthropic still ran the agent itself. The November 2026 announcement goes further: the entire service moves home.
That matters because the classic objection to agentic coding tools has always been the same: to let an agent fix your build, you had to hand it your code, your credentials and your ticket history and trust a vendor's cloud with all three. Self-hosted Managed Agents answers the first two parts of that objection. Your agent harness, your sandboxes, your credentials and your session history stay inside your boundary. Only the model calls leave, going to whichever inference provider you configure — Anthropic by default, or Amazon Bedrock, Google's Agent Platform, Microsoft Foundry, or your own model gateway.
What Changed on 12 November 2026
The ClaudeDevs account announced self-hosted Claude Managed Agents in private beta on 12 November 2026. A self-hosting customer operates three pieces. First, cma-server, which exposes the Managed Agents API, runs the agent loop and stores agents and sessions. Second, a PostgreSQL database, version 16 or later, that holds agents, sessions and their histories — without it, the server keeps data only in memory and a restart erases it. Third, the workers that run shell and file tools inside the customer's sandboxes. The server itself never runs an agent's shell or file tools.
Two details deserve your attention before you write a single prompt. Anthropic says it has no remote access to the self-hosted server or its logs, which is the whole point of the exercise. But self-hosting does not keep model traffic inside your network: prompts still go out to your chosen provider and completions come back, so teams with a zero data retention agreement should confirm what that covers. And the private beta is not a feature-for-feature copy of the hosted service. Scheduled deployments, dreams and webhooks are unavailable on the self-hosted server, and web search and web fetch stay switched off until you explicitly enable them. Access is deliberately narrow for now: it is available only to eligible organisations through an Anthropic account team, which hands over the release archive. Anthropic has published no pricing, no list of covered countries and no schedule for leaving beta. That context shapes every prompt below — these are written for real, scoped, unattended work, not for open-ended exploration.
If you are still setting up the agent side of your workflow, our guide to Claude Agent Skills covers the skills system that pairs naturally with Managed Agents. And if your team also uses OpenAI's tooling, our OpenAI Codex Security walkthrough shows the same scan-and-fix loop from the other side of the fence.
How to Write Prompts That Work for Self-Hosted Agents
Before the 20 prompts, four principles will make all of them work better. First, name the boundary in every prompt. Tell the agent exactly which directories, services and credentials it may touch, and state what is off limits. An agent running inside your network with your credentials is powerful; an agent with vague instructions is dangerous. Second, demand evidence, not assertions. Ask for test output, log excerpts and file paths in every result, so a human can verify the work in minutes. Third, give the agent a stopping rule. Tell it when to stop, escalate and ask — for example, after three failed attempts, or whenever a change touches authentication, billing or production data. Fourth, keep secrets out of the prompt itself. Self-hosted Managed Agents lets you keep credentials in your own secrets manager; reference them by name and let the agent fetch them through the vault, rather than pasting tokens into instructions that then live forever in session history.
How to Use These Prompts
Replace every square-bracket placeholder with your own values before you run a prompt. Keep each prompt in your team's shared library with a short note about what it is for and what it must never be allowed to do. Start with one agent and one repository, review the session history the cma-server stores in your own database, and only then roll the prompt out more widely. The session history is one of the quiet advantages of self-hosting: every run is auditable in your own PostgreSQL database, so prompt improvements can be driven by what actually happened rather than by guesswork.
20 Best Claude Managed Agents Prompts
Prompts 1–5: Fixing Broken Builds and Bugs
Broken builds are the original Managed Agents job, and they are the best place to start because the feedback loop is fast: the build either passes or it does not.
Prompt 1 — Fix the failing build.
You are a senior engineer working in the repository at [repo path]. The build on branch [branch] is failing with the error in [CI log link or pasted output]. Reproduce the failure locally first, then identify the root cause. Fix only the code that causes the failure. Do not refactor unrelated code, do not change dependencies, and do not touch [protected paths]. Run the full test suite and the build again. Report the root cause, the files changed, and the exact test output proving the build passes. If the build still fails after three attempts, stop and summarise what you tried.
Prompt 2 — Work through the bug backlog.
Work through the open bugs in [tracker project or label], starting with the highest priority. For each bug: reproduce it, write a failing test that captures it, fix it, and confirm the test passes. Limit each fix to the smallest change that resolves the reported behaviour. Do not close any ticket yourself. Produce a table listing each bug, its root cause, the files changed, and the test evidence. Stop after [number] bugs or [time limit], whichever comes first, and report what remains.
Prompt 3 — Fix the flaky test.
The test [test name] in [file] fails intermittently in CI but passes locally. Run it [number] times and capture the failure modes. Determine whether the flakiness comes from timing, shared state, test ordering or an external dependency. Fix the root cause rather than adding retries or sleeps. If the cause is a genuine race condition, fix the synchronisation and explain the ordering guarantee you relied on. Show the before-and-after failure rates.
Prompt 4 — Resolve the merge conflict fallout.
Branch [branch] was just merged into [main branch] and [number] tests now fail. Identify which merged change broke each test. For each failure, decide whether the test expectation or the merged code is wrong, and fix the wrong side only. Do not revert the merge. Run the affected test files plus the full suite for the touched modules, and report each failure with its cause and fix.
Prompt 5 — Patch the dependency break.
Upgrading [dependency] from [old version] to [new version] breaks the build. Read the dependency's changelog and migration notes first. Update only the call sites affected by breaking changes, following the documented migration path. Do not upgrade any other dependency. Run the full test suite and the linter, and list every changed call site with the reason it changed.
Prompts 6–9: Testing Releases and Reviewing Code
Release testing is where an unattended agent earns its keep: it can run the boring, thorough checks humans skip under deadline pressure.
Prompt 6 — Pre-release regression sweep.
Release [version] is cut from branch [branch]. Run the full regression suite, the smoke tests and the migration scripts against a clean copy of the staging database. Compare the results with the last green release, [previous version]. List every new failure, every test that was skipped, and every migration that took longer than [threshold]. Do not deploy anything. Produce a go or no-go recommendation with the evidence for each blocking item.
Prompt 7 — Review the pull request.
Review pull request [number] in [repository] as a senior reviewer. Check correctness, edge cases, error handling, test coverage, security implications and consistency with the surrounding code. Do not approve or merge. Produce a review with three sections: blocking issues with file and line references, non-blocking suggestions, and questions for the author. Reference the project's style guide at [link] and flag any deviation from it.
Prompt 8 — Generate missing tests.
Module [module path] has [percentage]% test coverage. Write tests for the untested branches and edge cases, prioritising public functions, error paths and boundary conditions. Do not change the module's behaviour. Every new test must fail if the corresponding code is reverted. Run the coverage report before and after, and list the coverage gain per function.
Prompt 9 — Check the release notes.
Draft release notes for version [version] from the merged pull requests since [previous version]. Group changes under Features, Fixes and Breaking Changes. Every entry must link to its pull request and name the user-facing effect in plain language. Flag any change that alters an API, a configuration key or a default, and list it under Breaking Changes even if the author did not. Do not publish the notes; return them as a draft for review.
Prompts 10–13: Triaging Alerts and Incidents
Alert triage is the highest-value agent job in a self-hosted setup, because the agent can read your logs and dashboards without any of that data leaving your network.
Prompt 10 — Triage the overnight alerts.
Triage all alerts fired between [start time] and [end time] in [monitoring system]. For each alert, pull the relevant logs and metrics, classify it as genuine incident, known issue, false positive or noise, and state your evidence in two sentences. Link each genuine incident to an existing ticket or draft a new one with severity, affected service and the first three diagnostic steps. Do not page anyone and do not change any production configuration.
Prompt 11 — Investigate the error spike.
Errors on [service or endpoint] rose [percentage]% in the last [time window]. Find the first error, identify the change that introduced it, and determine whether it is a code defect, a configuration change or an upstream dependency failure. Quote the exact log lines and the deploy or commit that correlates with the start of the spike. If the cause is a bad deploy, prepare a rollback plan but do not execute it. Report your findings with timestamps.
Prompt 12 — Root-cause the slow endpoint.
Endpoint [endpoint] has a p95 latency above [threshold] for the last [time window]. Profile the request path, identify the slowest stage, and check the database queries, cache hit rates and downstream calls for that window. Recommend the single highest-impact fix with the evidence behind it, and estimate the expected latency improvement. Do not change production configuration or run load tests against production.
Prompt 13 — Summarise the incident for the post-mortem.
Write a post-mortem draft for incident [ID] from the timeline in [incident channel or ticket], the deploy log and the alert history. Structure it as: what happened, impact and duration, timeline, root cause, what went well, what went badly, and action items with owners. Keep the timeline factual and timestamped. Do not assign blame to any individual. Flag any action item that needs a decision from [team or manager] before it can proceed.
Prompts 14–16: Documentation and Knowledge Work
Documentation is the safest first agent workload for a team new to self-hosting, because the blast radius of a bad draft is a document, not a deployment.
Prompt 14 — Document the undocumented module.
Write developer documentation for [module or service]. Read the code, the tests and the existing docs first. Cover what it does, how it is configured, its public interfaces, its failure modes and how to run it locally. Include a worked example using realistic data. Mark anything you could not verify from the code with [UNVERIFIED] rather than guessing. Do not invent configuration options, endpoints or behaviours.
Prompt 15 — Turn the ticket thread into a runbook.
Convert the resolved ticket [ID] and its discussion thread into a runbook entry for [on-call rotation]. Structure it as: symptoms, diagnosis steps with the exact commands, the fix, and how to verify the fix worked. Link the original ticket and the relevant dashboards. If the thread contains two different fixes, record both and note which one the team actually used. Return the runbook as a draft for the on-call lead to approve.
Prompt 16 — Audit the README files.
Audit every README in [repository or directory]. For each one, check that the setup instructions work from a clean checkout, that every command runs, and that every link resolves. Fix broken commands and dead links. Flag any README that describes behaviour the code no longer has, and list those discrepancies separately rather than silently rewriting them. Report the number of READMEs checked, fixed and flagged.
Prompts 17–18: Security and Compliance Checks
Security prompts need the tightest scoping of all. Note that the self-hosted server keeps credentials in your own secrets manager, which is exactly why these prompts reference secrets by name instead of embedding them.
Prompt 17 — Scan the new code for secrets.
Scan all files changed in [branch or pull request] for hardcoded secrets: API keys, tokens, passwords, private keys and connection strings. Check code, configuration files, test fixtures and comments. For each finding, report the file, line number, secret type and a redacted excerpt — never reproduce a full secret in your output. Do not fix findings by committing replacements; instead, list the correct secrets-manager reference for each one, using the vault paths in [secrets documentation].
Prompt 18 — Review the dependency vulnerabilities.
Run the vulnerability scan for [repository] and triage every finding rated high or critical. For each one, check whether the vulnerable code path is actually reachable in our configuration, and whether a patched version exists. Produce a table with severity, reachability, patched version and the change required. Do not upgrade anything yet. Highlight any finding with a public exploit and no available patch, and recommend a mitigation for it.
Prompts 19–20: Planning and Operations
The last two prompts use the agent as a planning assistant — the kind of long, boring synthesis work that benefits most from a session history you can audit later.
Prompt 19 — Plan the sprint from the backlog.
Draft a sprint plan from the backlog in [tracker project] for a team of [number] engineers over [duration]. Rank items by the priority and effort fields, and flag any item missing an estimate, an owner or acceptance criteria. Identify dependencies between items and surface any item blocked by another team's work. Keep total committed effort within [capacity] points. Return the draft as a table with item, owner, estimate and dependency notes, plus a separate list of items that need clarification before they can be committed.
Prompt 20 — Weekly engineering digest.
Produce a weekly digest for the week of [date] covering [repositories or teams]. Summarise merged pull requests, open incidents, test health trends and the oldest open bugs. Highlight any metric that moved more than [threshold]% week on week, in either direction. Keep the whole digest under 500 words, use bullet points, and link every claim to its source: a pull request, a ticket or a dashboard. Do not send the digest to anyone; return it as a draft.
Prompting Safely Inside Your Own Perimeter
Self-hosting changes the security story, but it does not remove it. The agent still runs code, still reads your repositories and still calls a model outside your network. Keep web search and web fetch switched off unless a specific task needs them — they are disabled by default on the self-hosted server for a reason. Keep credentials in your own secrets manager and reference them by name. Use the deny-instead-of-prompting controls that arrived with Claude Code 2.1.319 for unattended coding, so the agent cannot silently approve its own risky actions. And remember the gaps: scheduled deployments, dreams and webhooks are not available in the private beta, so do not write prompts that assume they exist. Design your workflows around what the beta actually does — long-running, scoped, auditable agent work inside your own infrastructure.
For a broader prompt library beyond agent operations, our Gemini 4 Hydrogen prompts cover the newest Google model, which launched the same week as this announcement. The prompting habits transfer: scope tightly, demand evidence and always keep a human in the loop for anything irreversible.
What Happens Next
Three things are worth watching. First, whether Anthropic opens the private beta more widely and when general availability lands — no date has been given, and access still runs through an account team. Second, whether the missing hosted features, especially scheduled deployments and webhooks, arrive on the self-hosted server, because those two decide whether teams can run fully autonomous schedules inside their own perimeter. Third, whether rivals follow: Mistral moved its Studio, with managed agents and apps, to VPC and on-premises on 6 November 2026, just six days before Anthropic's announcement, so self-hosted agents are clearly becoming a competitive battleground rather than a one-off feature. The teams that benefit first will be the ones that build their prompt libraries now, while the beta is small — and the 20 prompts above are a solid place to start.
#ClaudeManagedAgents #Anthropic #Claude #AIAgents #PromptGuide #EnterpriseAI #AICoding #DevOps #AISecurity #NextGenAIVibe
Comments (0)