Agent orchestration

Supervisor and Worker Agents: Designing Clear Task Ownership

A supervisor-worker system succeeds when every delegated result has an owner, a contract, and an acceptance check. This guide designs those boundaries through a concrete coding workflow and shows how to handle concurrency, conflicting outputs, and partial failures.

AI-assisted technical guide with linked primary sources. Examples are illustrative unless stated otherwise. How these guides are made.

Delegate an independently checkable result

A supervisor-worker design has one coordination owner: the supervisor decides which bounded tasks to delegate, collects their results, and judges whether the overall goal is satisfied. Workers investigate or implement their assignments with narrower context. Anthropic’s agent-pattern guide describes this dynamic decomposition as an orchestrator-workers pattern. That architectural description does not imply that every task benefits from parallel agents.

Use delegation when a result can be checked without reconstructing the worker’s entire conversation. A schema inspection, isolated module change, or evidence-backed research note can fit. Two workers repeatedly negotiating the same interface usually need a shared design decision first. Before adding a worker, write its acceptance check. If you cannot describe that check, splitting the work may only distribute ambiguity.

Give the supervisor responsibilities that survive delegation

The supervisor owns the goal, dependency graph, task registry, integration order, and final evidence. A worker may recommend changing the plan, but it should not silently redefine another worker’s scope. Keep a single owner for shared contracts and consequential decisions. Otherwise every worker can make a locally reasonable change that produces a globally inconsistent system.

Record explicit task states such as planned, running, blocked, submitted, accepted, and rejected. Submission means an artifact exists; acceptance means it meets its contract. Preserve who accepted it and against which revision. A supervisor that simply concatenates success messages is a message router, not a reliable integration owner.

Give humans a clear escalation path for uncertain requirements and high-impact actions. The supervisor’s confidence does not replace the user’s authority.

Make the delegation contract small and enforceable

For each worker, provide the goal, inputs, owned outputs, prohibited changes, dependencies, budget, and stop conditions. Include a revision or version for the task brief. A worker that discovers an incompatible requirement should return a decision request with evidence, rather than expanding its authority.

task_id: export-format-01
brief_revision: 3
base_revision: recorded repository commit
owns: CSV serializer and its focused tests
inputs: approved export contract v2
must_not_change: API authorization, dependencies
submit: patch, test results, unresolved assumptions
stop_when: contract conflicts with the data model

This is an illustrative contract, not a framework configuration. Your runtime must enforce access restrictions through actual capabilities and isolation where needed. Prompt text can express file ownership, but it cannot prevent an overprivileged process from touching another directory.

Work through a bounded invoice-export feature

Suppose a product needs an invoice CSV download. The supervisor first approves a contract covering field names, escaping, date representation, authorization, and empty results. It then creates two implementation tasks with separate working directories and one integration owner.

Illustrative ownership for an invoice export
OwnerAssignmentAcceptance evidence
Serializer workerGenerate CSV from approved row objectsExpected output for commas, quotes, and empty rows
Route workerExpose the authorized download endpointAuthorized success and cross-tenant denial
SupervisorIntegrate the real serializer and routeCombined download behavior on the final revision

The route worker can use a test double with the approved serializer signature until the real module is accepted. Neither worker owns the package manifest unless that responsibility is explicitly assigned. Shared test databases and server ports also need coordination; separate directories do not isolate those resources.

Limit concurrency by integration capacity

Start with a small active-worker limit and a bounded queue. Dispatch only tasks whose dependencies are accepted. Reserve capacity for decisions, repairs, and integration instead of filling every slot with implementation. A larger worker count is useful only if the added outputs can be reviewed and combined.

Anthropic’s multi-agent research report describes specialized parallel subagents and the coordination and resource costs they introduce. That experience concerns its research system; it is not a universal speedup guarantee for software work.

For the invoice example, if serializer implementation and route implementation finish while the export contract remains disputed, more workers cannot resolve the missing product decision. Track time in each state to distinguish execution bottlenecks from approval or review bottlenecks. Adjust the active limit using your own observations.

Return evidence and merge data deliberately

A worker result should carry its task ID, brief revision, base revision, artifact locations, executed checks, findings, and limitations. Keep bulky logs outside the supervisor’s immediate context and return a concise index to relevant evidence. Report failed or unavailable checks accurately.

The LangGraph workflow documentation shows orchestrator-worker execution with separate worker state and an explicit mechanism for collecting outputs. The general engineering implication is to define how parallel results combine rather than relying on arrival order.

For code, inspect each patch before accepting it. For research, preserve source URLs and what each source supports. For structured data, validate schema and semantic constraints. When two workers disagree about the same field or requirement, retain the disagreement for resolution; do not let whichever result arrives last silently win.

Recover partial failures without restarting everything

Treat worker failures according to their cause. A temporary tool outage may justify a retry. A missing requirement needs clarification. A violated contract needs a revised assignment or rejection. A completed write with a lost acknowledgment needs reconciliation before another attempt.

Temporal’s retry documentation distinguishes retry behavior for workflow and activity execution and describes configurable backoff and attempt limits. If you use Temporal, consult its actual execution semantics; do not assume a generic agent framework provides the same guarantees.

In your own supervisor, persist accepted results separately from active attempts. If the serializer is accepted but the route worker crashes, preserve the serializer evidence and restart only the affected assignment against the agreed base. Fence stale attempts so an old worker cannot submit an obsolete result as current. External writes need operation identifiers and effect verification before replay.

Make integration a separate acceptance gate

A successful worker test does not establish that the combined system works. The supervisor must connect accepted artifacts, run relevant checks against the integrated revision, and inspect behavior at the boundary between assignments. In the invoice example, confirm the route actually calls the serializer, preserves tenant restrictions, and returns usable download headers.

Independent review can help identify missed assumptions, but two agents agreeing is not proof. Ask the reviewer to demonstrate a trigger, expected behavior, observed behavior, and consequence for each finding. Keep the final decision tied to requirements and evidence.

Watch for supervisor overload: unreviewed submissions, repeated context reconstruction, and rushed acceptance are signals to reduce concurrency or improve result contracts. Delegation has transferred implementation effort; it has not eliminated accountability.

Keep local worker sessions easy to find

When your workers are local coding sessions, coordination also includes finding the terminal that needs a decision. Purrvio’s Mac preview shows supported local agent sessions, with the richest support for Claude Code and Codex. It reads supported local session records and processes without installing hooks.

Purrvio can support the attention part of this workflow; it does not dispatch workers, enforce contracts, or verify integration. Navigation supports Ghostty and Terminal.app. Direct replies require Ghostty and Automation permission. If that visibility would help your local setup, try the free Mac preview. It supports macOS 13+ on Apple silicon and Intel. The current locally signed preview is not Apple-notarized; read the installation notes before launching.

Use this checklist before adding another worker

  • Write one independently checkable deliverable and an explicit integration owner.
  • Version the brief and identify the inputs, owned artifacts, and stop conditions.
  • Separate workspaces and coordinate shared files, databases, ports, and external effects.
  • Set a concurrency cap and dispatch only dependency-ready tasks.
  • Require evidence with every submission, including failures and checks that could not run.
  • Preserve accepted results, reconcile uncertain side effects, and reject stale attempts.
  • Validate the integrated result before reporting the user’s overall goal complete.

Keep the first implementation observable and simple. Add specialized workers when a repeated need justifies them. Remove unnecessary delegation when coordination becomes the dominant work.

Frequently asked questions

Does a supervisor need to be an LLM?

No. Fixed task routing and acceptance checks can often be ordinary code. Use model-driven planning where the task requires dynamic decomposition, while keeping permissions and important validation in deterministic controls.

How many worker agents should run at once?

There is no universal optimum. Begin with a small cap and increase it only when assignments are independent and review capacity can absorb the outputs. Track integration delays and rework rather than active-agent count alone.

Can Purrvio act as the supervisor?

Purrvio provides visibility into supported local coding sessions and terminal navigation. Planning, dispatch, task contracts, isolation, and final acceptance belong to your orchestration system or manual workflow.

Sources and further reading

Primary references checked for this guide on 10 November 2026. Documentation can change; confirm version-specific behavior before using commands in a production workflow.

  1. Anthropic: Building effective agents

    Describes orchestrator-worker decomposition and the tradeoffs of adding agentic complexity.

  2. Anthropic: How we built our multi-agent research system

    Documents specialized subagents, parallel research, and coordination and resource costs in a specific production system.

  3. LangGraph: Workflows and agents

    Shows explicit orchestration, individual worker state, and aggregation of parallel worker outputs.

  4. Temporal: Retry policies

    Explains workflow versus activity retries, backoff, and configurable retry policies; used to distinguish concrete runtime semantics from generic recommendations.

Download Purrvio.

Free Mac preview. No account or API keys.

This locally signed preview isn’t Apple-notarized. macOS may block the first launch.

Download free preview ↗

3.2 MB ZIP · Apple silicon and Intel · macOS 13.0+

Read installation steps

One email before you go.

I’ll send a short setup note and reply if you hit a snag. No spam, unsubscribe anytime.