Direct answer: Claude Managed Agents can now run dynamic workflows on Anthropic’s servers. Set the agent’s multiagent.type to multiagent_20261001, leave workflows enabled, create a new session, and tell the agent when a large task should become a workflow run. The agent writes the orchestration program; Anthropic runs it in the background across isolated agent threads.[1]
result: completed as proof that every worker succeeded. Anthropic says a run may use up to 64 concurrent working threads and start up to 1,000 agents over its lifetime, so an unconstrained test can consume substantial tokens.[2]Quick setup checklist
- Use a Claude API key and the
managed-agents-2026-04-01beta header.[3] - Define an agent with
multiagent.type: multiagent_20261001.[1] - Keep
workflowsenabled; disablesubagentsif you want workflow-only orchestration.[1] - Add a system-prompt rule explaining which tasks deserve a workflow.
- Create a new session after changing the agent definition; existing sessions keep their copied configuration.[1]
- Set a hard session budget before the run starts.
- Open the event stream before sending the task, then track every run through
workflow_run.status_ended.[2] - Inspect failed threads even when the run reports
completed.[2]
What Claude Managed Agents dynamic workflows do
A dynamic workflow is not merely “several prompts at once.” The primary agent writes a program that defines phases, starts other agents, passes results between them, repeats or branches when needed, and combines the output. Anthropic’s server executes that program in the background while the primary thread can keep working or report progress.[1][2]
This is useful for work that has many independent pieces: reviewing hundreds of files, checking a large contract set, migrating many modules, researching several source classes, or having separate agents verify one another. Each worker gets an isolated conversation history while sharing the session sandbox and files.[1][2]
Minimal agent definition
The following definition enables workflows and disables ordinary subagent delegation, making the behavior easier to reason about during a first test:
---
name: Repository auditor
model: claude-sonnet-5-5
tools:
- type: agent_toolset_20260401
multiagent:
type: multiagent_20261001
workflows:
type: enabled
subagents:
type: disabled
---
Audit repositories for repeated security and reliability issues.
Use a workflow only when the task covers more than 10 independent files.
Start with one agent per file group, then use a separate review phase.
Do not modify files unless the user explicitly requests changes.
If a worker fails, list its scope as not checked rather than treating it as clean.
Apply the definition with Anthropic’s ant CLI:
ant apply repository-auditor.md
With multiagent_20261001, workflows and regular subagents are enabled by default. Explicitly disabling subagents is optional, but it prevents the primary agent from mixing two orchestration styles during the test.[1]
How to trigger a workflow run
There is no separate “start workflow” API request. Send a normal user.message. The agent decides whether to start a run based on the task and the instructions in its system prompt or user message.[1]
A practical request should define scope, output, failure handling, and cost boundaries:
Start a workflow run to audit the 40 files in /workspace/src/api.
Check for missing authentication, authorization, and input validation.
Use no more than 8 workers at a time.
Do not edit files.
Have a second phase independently verify every finding.
If a file cannot be read, mark it NOT CHECKED.
Return a table with file, line, severity, evidence, and recommended fix.
The stated worker count is guidance to the agent, not a replacement for the platform’s limits or a session budget. For a high-risk integration, restrict available tools and use predefined agents with deliberately narrow permissions instead of allowing every workflow to define unrestricted inline agents.[1]
Dynamic workflows vs subagents
| Question | Subagents | Dynamic workflows |
|---|---|---|
| Who controls the next step? | The primary agent, turn by turn | The generated workflow program |
| Best fit | A few specialists that need follow-up | Large parallel jobs, phases, loops and cross-checking |
| Intermediate results | Returned to the coordinating agent | Passed programmatically between workflow stages |
| Agent definitions | Predefined or inline | Predefined or inline |
| Thread behavior | Persistent until archived | Archived by the server by the end of the run |
| Main cost risk | Repeated delegation | Many workers consuming tokens at once |
Use subagents when the coordinator must ask a specialist follow-up questions. Use a workflow when the plan itself should live in a repeatable program and many pieces can run independently.[1]
Limits you should design around
| Limit | Documented value | Operational meaning |
|---|---|---|
| Working threads in one run | 64 at once | Additional work waits; Anthropic says this number is not guaranteed to remain fixed. |
| Agents started over one run | 1,000 | Attempting another ends the run with thread_limit_error. |
| Default run lifetime | 24 hours | The agent may set a shorter lifetime; expiry produces timeout_error. |
| Open runs in one session | 10 by default | Idle runs count; another start is refused. |
| Predefined agents per workflow list | 20 | Inline agents are separate and enabled by default. |
These are upper limits, not recommended starting values. Begin with two to five workers on a narrow slice, inspect quality and token use, then scale only when parallelism materially improves the outcome.[1][2]
Track the run correctly
Listen to the session event stream rather than repeatedly polling. Important events include:
workflow_run.created: record the run ID and declared phases.workflow_run.status_running: the run started or resumed.workflow_run.phase_startedandworkflow_run.phase_ended: update progress.workflow_run.status_idle: the run paused; this does not mean it finished.workflow_run.error: log the error, but continue tracking if a run ID exists.workflow_run.status_ended: the final run event and the point at which its result can be evaluated.
The overall job is complete only after every observed run has ended and the session later reaches session.status_idle with end_turn. A paused run can leave the session idle, so “session idle” alone is not a completion signal.[2]
Do not trust “completed” blindly
Anthropic explicitly notes that {"type":"completed"} means the workflow program finished; it does not mean every worker succeeded or every check passed. Read each run thread’s events and usage, identify failures, and require the final report to distinguish checked, failed, and not checked scopes.[2]
This matters most for audits and migrations. A missing worker result must not silently become “no issue found.” Build a reconciliation phase that compares the expected item list with the processed item list before producing the final answer.
Cost and safety checklist
- Set the budget at session creation. A workflow has no separate price; all worker model requests count toward session usage and are billed at each model’s rates.[2]
- Use cheaper workers where appropriate. Predefine narrow agents with suitable models instead of running the strongest model for every classification or extraction step.
- Start with a sample. Test one folder or 10 documents before processing the full corpus.
- Keep tools idempotent. Anthropic says a run may create more than one thread for the same work, so repeated tool calls must not double-charge, double-send, or corrupt state.[2]
- Restrict credentials and network access. Workers share the session sandbox and resolved vault credentials. Give each predefined agent only the MCP servers and tools it needs.[1]
- Handle interruptions explicitly. A session interrupt does not automatically end open workflow runs. Ask the primary agent to stop them and confirm their
status_endedevents.[2] - Review beta data handling. Managed Agents stores state server-side and is not currently eligible for Zero Data Retention or HIPAA BAA coverage, according to Anthropic’s overview.[3]
When not to use a dynamic workflow
- The task has only one or two tightly connected steps.
- Every worker would need the same large context, leaving little benefit from isolation.
- The action is irreversible and no human approval gate exists.
- A deterministic script or database query can do the job more cheaply and reliably.
- You cannot tolerate the current beta’s data-retention or operational constraints.
Parallel agents do not automatically improve quality. Use them when the task naturally decomposes and when a verification phase can catch omissions or disagreements.
FAQ
Are Claude Managed Agents dynamic workflows available to every API account?
Anthropic says Managed Agents access is enabled by default for API accounts and requires the managed-agents-2026-04-01 beta header. Specific account, model, platform, rate-limit, or regional constraints may still apply.[3]
Do I call a workflow endpoint to start a run?
No. Send a normal user message to a configured Managed Agents session. The primary agent decides whether to start a workflow run.[1]
Can a workflow start another workflow?
No. Only the primary session agent starts runs; agents inside a workflow run cannot nest another run.[2]
How many agents can a run use?
Anthropic documents up to 64 working threads at once and up to 1,000 agents started over a run’s lifetime. Treat those as hard ceilings, not targets.[2]
Does interrupting the session stop its runs?
No. An interrupt stops the agent’s turn but does not end open runs. Send a new message asking the primary agent to stop them, then wait for each run’s final event.[2]
Does a completed result mean every item was checked?
No. It only confirms that the workflow program finished. Inspect worker threads and reconcile expected versus processed items.[2]
Can I use Managed Agents under Zero Data Retention?
Not currently. Anthropic says the stateful Managed Agents service is not eligible for Zero Data Retention or HIPAA BAA coverage.[3]
Sources
- Anthropic — Multiagent orchestration
- Anthropic — Workflow runs
- Anthropic — Claude Managed Agents overview
Checked October 9, 2026. Managed Agents and this multi-agent configuration are beta features; limits and behavior can change.