Slides · Harness engineering

Orchestration, subagents and people in the loop

Orchestration, subagents and people in the loop

Once a task is split, the harness decides how work is handed over, who checks it, where each agent works and where a person stands.

By the end you can explain what a subagent buys and costs, write a delegation contract, split building from checking, isolate parallel agents, and place people on an autonomy ladder.

Concept

Start with the simplest design

  • Anthropic’s December 2024 guide recommends the simplest solution that works, adding complexity only when needed.
  • For many applications, the same guide says, one LLM call with retrieval and in-context examples is usually enough.
  • It also notes that agentic systems often trade latency and cost for task performance.
  • Each step up the ladder costs more: single call, fixed workflow, one agent, several agents.
  • Splitting a task is a decision you have to justify with a measured gain, not a default.

Source1 Building effective agents

Concept

Why a split can make things worse

  • Anthropic reports that vague task descriptions led subagents to overlap with each other, leave parts of the task untouched, or lack information they needed.
  • Cognition argues that parallel agents without shared context make conflicting implicit decisions, and calls multi-agent collaboration fragile as of 2025.
  • Handoffs lose detail, one agent’s mistake becomes another’s input, and five traces are harder to read than one.
  • These are harness problems: the fixes below are contracts, isolation and a review point.

Sources2 How we built our multi-agent research system3 Don't Build Multi-Agents

Concept

Mental model: the supervisor and the ticket queue

  • Checking every action makes work crawl; checking only the end sees too little, too late.
  • The better move is to change the jobs, not the supervisor’s position.
  • Give each agent its own slice of the queue, so two cannot pick up the same ticket.
  • Hand each a brief that says what the job is and what to return.
  • The supervisor reads only what comes back.

That is three ideas: a contract, an isolation boundary and a review point.

Diagram

A subagent isolates context

Diagram: The parent sends each subagent a task with limits, and each explores in its own window.

task + limits

task + limits

short result

short result

Parent: small context

Subagent A

Subagent B

Diagram summary: The parent sends each subagent a task with limits, and each explores in its own window. Only a short result comes back up the arrows to the parent, so the parent’s window stays small. Anthropic’s context-engineering post (29 September 2025) says such summaries are often 1,000 to 2,000 tokens.

Source4 Effective context engineering for AI agents

Worked example

Worked example: isolation has a fixed overhead

Illustrative numbers. The parent starts at 15,000 tokens. Each subagent costs the parent a 600-token brief it writes and a returned summary. Compare a small read with a large one.

AspectSmall: one 3,000-token fileLarge: eight 25,000-token log files
Parent context, parent reads15,000+3,000=18,00015{,}000 + 3{,}000 = 18{,}00015,000+8×25,000=215,00015{,}000 + 8 \times 25{,}000 = 215{,}000
Parent context, delegated15,000+600+1,000=16,60015{,}000 + 600 + 1{,}000 = 16{,}60015,000+8×(600+1,000)=27,80015{,}000 + 8 \times (600 + 1{,}000) = 27{,}800
Total work, parent reads3,000200,000
Total work, delegated3,000+600+1,000=4,6003{,}000 + 600 + 1{,}000 = 4{,}600200,000+8×1,600=212,800200{,}000 + 8 \times 1{,}600 = 212{,}800
Extra total work1,600, about 53% more12,800, about 6.4% more

The overhead per subagent is roughly fixed (a brief plus a summary), so it is large against a small read and small against a big one. That is why subagents suit broad, heavy exploration and not quick lookups. This count ignores that a big parent window is re-read on later turns, and real systems cost more (next slide).

Source4 Effective context engineering for AI agents

Compare

What multi-agent really costs, and when it pays

Anthropic (13 June 2025) measured its own research system: agents used about 4 times the tokens of chat, and multi-agent systems about 15 times. Token use alone explained 80 percent of the variance on one benchmark (BrowseComp).

AspectLikely worth itLikely not worth it
Task shapeBroad search, many independent readsSmall task, quick answer
ContextInformation exceeds one windowAll agents need the same context
ParallelismHeavy parallel partsFew parallel parts (the post says most coding tasks have fewer than research)
ValueHigh value per taskLow value, cost-sensitive

The post’s own fit list also includes tasks with many complex tools. Pay for isolation and parallelism only when the task is on the left.

Source2 How we built our multi-agent research system

Concept

The delegation contract

Anthropic’s write-up lists four things to hand every subagent: a goal, the shape of the result, which tools and sources to use, and the limits of its task. A usable brief states:

  • Objective and what a good result looks like.
  • Constraints: scope, what is out of bounds, a budget.
  • Allowed tools, and which of them can change anything.
  • Output format: a structure the parent can read without redoing the work, with file pointers for detail.
  • Stop condition, and where to write artefacts.

Missing fields show up as duplicated work, runaway reading or a reply too long to use.

Source2 How we built our multi-agent research system

Diagram

Brief out, structured result back

Diagram: The parent sends a brief to the subagent, which returns a structured result and file paths.

brief

result + file paths

valid

invalid

Parent agent

Subagent

Parent validates schema

Use the summary

Reject or re-ask

Diagram summary: The parent sends a brief to the subagent, which returns a structured result and file paths. The parent validates the result against the schema before using it. A valid result is used, and an invalid one is rejected or sent back, so a malformed handoff never flows silently into the next step.

Code

Contract as code: check the brief and the result

Python

import posixpath

REQUIRED_BRIEF = {"objective", "constraints", "allowed_tools", "output_schema", "stop_condition", "artifact_dir"}
MAX_SUMMARY_CHARS = 2000  # roughly 500 tokens; tune per system
STATUSES = ("done", "blocked", "budget_exhausted")

def _empty(value):
    return value is None or (isinstance(value, str) and not value.strip())

def check_brief(brief: dict) -> list[str]:
    """Return the missing or empty contract fields. An explicit empty allowed_tools list means 'no tools'."""
    return sorted(f for f in REQUIRED_BRIEF
                  if f not in brief or _empty(brief[f])
                  or (f != "allowed_tools" and not brief[f]))

def check_result(result: dict, artifact_dir: str) -> list[str]:
    """Reject a subagent result the parent should not trust or cannot afford to read. POSIX paths only."""
    if not isinstance(result, dict):
        return ["result must be a dict"]
    problems = []
    status = result.get("status")
    if not isinstance(status, str) or status not in STATUSES:
        problems.append("status must be done, blocked or budget_exhausted")
    summary = result.get("summary", "")
    if not isinstance(summary, str) or not summary:
        problems.append("summary missing")
    elif len(summary) > MAX_SUMMARY_CHARS:
        problems.append("summary too long: write detail to a file and point to it")
    files = result.get("files", [])
    base = posixpath.normpath(artifact_dir)        # "./out/sub-a/" becomes "out/sub-a"
    inside = lambda p: "\\" not in str(p) and posixpath.normpath(str(p)).startswith(base + "/")
    if not isinstance(files, list) or not all(inside(p) for p in files):
        problems.append("files outside the artifact directory")
    return problems

I ran these checks with a test script (15 cases, all passed):

CaseOutcome
Complete brief; empty allowed_tools list (means no tools)accepted
Empty or whitespace-only stop conditionflagged
Good resultaccepted
5,000-character summaryrejected
File in a sibling directory, a name-prefix sibling (out/sub-aa), a .. escape, or a backslash pathrejected
Artifact directory written as ./out/sub-a/normalised, good file accepted
Artifact directory .rejects everything (fails safe)
Unknown or unhashable status, or a result that is not a dictrejected without a crash

Limits: POSIX paths only, the result must be a dict, symlinks are not resolved, and 2,000 characters is an arbitrary cap to tune.

Process

Hand over artefacts, not transcripts

  1. Write the task, plan and status to files with a job identifier.
  2. Give every inter-agent message a schema, and validate it on receipt.
  3. Have the subagent write detail to its own artefact directory and return pointers.
  4. Add a status field so a handoff can resume after a failure.
  5. Name one owner for each artefact, so two agents never edit the same thing.

Check yourself

Check: three agents, one bug

A lead agent asks three subagents to “look into why checkout is slow”. Two come back with the same finding about the database, and nobody looked at the front end. Which parts of the contract would you add to prevent both problems?

Answer

Give each subagent a distinct objective and boundary (for example database, API layer, front end) so the work does not overlap and nothing is left out. Add an output format with file pointers so the parent can merge findings without rereading. This is the failure Anthropic describes: vague task descriptions led to duplicated work and gaps. Splitting by area also gives each artefact one owner.

Diagram

Building and checking are different jobs

Diagram: Before work starts, the team agrees what done means.

pass

fail

Agree what done means

Builder writes the work

Separate checker

Accept

Diagram summary: Before work starts, the team agrees what done means. The builder writes the work and a separate checker tests it against that definition. A pass means accept, and a fail sends it back to the builder down the same loop. The checker is best a deterministic test; a second agent with different instructions is the alternative.

Source5 Demystifying evals for AI agents

Concept

Rules for the checker, and the cost

  • An agent that writes work and also approves it is grading itself.
  • Prefer a deterministic test; use a second agent for what tests cannot see.
  • Define done before the work starts, so the checker does not move the goalposts.
  • Anthropic (9 January 2026) advises, as a general lean, grading the result the agent produced rather than the route it took, and reading transcripts to see whether a grader rejects valid work.
  • The cost is a second pass over each unit of work. Pay it where a defect is expensive.

Source5 Demystifying evals for AI agents

Compare

Route models by step type

AspectStronger modelSmaller, faster model
Step typePlanning, ambiguous decisionsExtraction, formatting, classification, routine checks
RiskHighLow
Context sizeLarge, tangledSmall, well-defined
FallbackFinal authorityEscalate to the stronger model when confidence is low
  • Decide by step type, risk and context size, and re-evaluate when a new model appears.
  • Route at boundaries of work. This is course reasoning, not a sourced rule: a mid-conversation switch may lose any cached prompt prefix, so test the cost on your provider before routing inside a conversation.

Check yourself

Check: where is a checker worth paying for?

A team runs two agent jobs: fixing typos in an internal wiki, and migrating payment records. They can afford a separate checker for only one. Which, and why?

Answer

The payment migration. A checker adds a second pass over every unit of work, so it pays where a defect is expensive and hard to undo. Typos are cheap to spot and to revert. Where possible make the payment checker deterministic (row counts, totals, schema checks) rather than another agent, and agree what done means before the migration starts.

Process

Parallel agents on one codebase

Several agents in one repository bring merge conflicts, duplicated work, inconsistent assumptions and fights over ports and databases. The measures, in order:

  1. A separate working copy or container per task.
  2. Ownership by directory or module: one owner per artefact.
  3. A queue with locks for shared resources such as a test database.
  4. Small changes, so conflicts stay small.
  5. An integration step (an agent or CI) that decides what merges.

This course’s judgment, not a measured result: coordination overhead tends to grow faster than throughput, so measure before adding agents.

Worked example

Worked example: five agents, one monorepo

Illustrative layout for five tasks.

AgentWorking copyOwnsShared resource
Awt-authservices/auth/none
Bwt-billingservices/billing/test database (lock)
Cwt-searchservices/search/none
Dwt-docsdocs/none
Ewt-sharedlibs/common/ (everyone else may only request changes)none
  • B and any other agent that needs the test database queue for the lock, so tests do not clobber each other.
  • A change to libs/common/ is a request to E, so the module five services depend on has one owner.
  • The integration step merges in dependency order, runs the full tests, and rejects a branch that touches paths it does not own.

Concept

A practice is right under its conditions

  • A team that merges with minimal blocking review reflects its throughput, cheap corrections and test coverage.
  • In a low-volume or high-risk setting the same practice is a poor choice.
  • Before copying a practice, write down the conditions it depends on and check whether you share them.
  • In an interview, state the conditions first, then the practice.

Concept

Where people stand

Böckeler describes the human role as improving the harness over time: when an issue recurs, strengthen the controls so it becomes less likely. A good harness directs human attention to where it matters most; it need not remove it entirely. Put people at:

  • Intent and acceptance, before work starts.
  • Irreversible or high-impact actions, as approval gates.
  • Escalations, when the agent needs a judgment.
  • The steering loop: reading traces and turning recurring failures into guides, sensors and hooks.

Experienced developers also bring an implicit harness of conventions, accountability and organisational context that agents lack.

Source6 Harness engineering for coding agent users

Diagram

The autonomy ladder

Diagram: Autonomy has four rungs, read from the bottom up: suggest only, act with approval, act and notify, act alone.

1 Suggest only

2 Act with approval

3 Act and notify

4 Act alone

Diagram summary: Autonomy has four rungs, read from the bottom up: suggest only, act with approval, act and notify, act alone. Each kind of action climbs one rung at a time toward act alone as evidence builds, not the whole agent at once. How far a kind of action goes depends on how reversible it is, how much damage it could do and how strong your verification is.

Worked example

Worked example: a docs-maintenance agent

Illustrative judgment for an agent that maintains a documentation site.

ActionReversible?Starting rungEvidence to move up
Read pages, searchn/aAct alonenone needed
Fix typos in a draft branchyesAct and notifyReviewers accept nearly all after a trial period
Open a pull request with a rewriteyes, before mergeAct with approvalLow rejection rate over many changes
Publish to the live sitepartlyAct with approvalChecks pass on staging, rollback proven
Delete a page, email authorsnoSuggest onlyRarely moves up

The agent is not on one rung. Each kind of action sits where its reversibility and verification justify.

Check yourself

Check: pick a rung for each action

A travel-booking agent can search flights, hold a seat (free to cancel for 24 hours), buy a non-refundable ticket and email the passenger a confirmation. Assign each action a starting rung and say what evidence would move one up.

Answer

One reasonable assignment (a judgment, not a rule): searching is read-only, so act alone. Holding a seat is reversible within 24 hours, so act and notify. Buying a non-refundable ticket cannot be undone, so act with approval. Emailing the passenger cannot be recalled and speaks for the company, so also act with approval at first. What would justify more autonomy is specific to each action: for example, many confirmation emails approved without edits could eventually justify sending them with a notification, while the ticket purchase stays gated until refunds and errors prove rare. Each action is judged on its own record.

Summary

Recap

  • Start with the simplest design; add agents only for measured gains.
  • Subagents isolate context and return short results; you pay in total tokens (about 4 times for agents and 15 times for multi-agent systems in Anthropic’s system).
  • Delegate with a contract: objective, constraints, tools, output format, stop condition. Pass artefacts, not transcripts.
  • Separate builder from checker, define done first, and route models by step.
  • Parallel work needs a working copy per task, ownership, a queue and an integration step.
  • Put people at intent, irreversible actions, escalations and the steering loop, and raise autonomy per action.

References

References & Sources (1 of 2)

  1. Building effective agents (opens in a new tab)

    Erik S., Barry Zhang2024Article

    Used for Recommends the simplest solution that works and notes that agentic systems often trade latency and cost for performance (19 December 2024).

  2. How we built our multi-agent research system (opens in a new tab)

    Jeremy Hadfield, Barry Zhang, Kenneth Lien, Florian Scholz, et al.2025Article

    Used for Token multipliers (about 4x for agents, 15x for multi-agent), the 80 percent variance finding on BrowseComp, the delegation fields and the duplicated-work failure, and when multi-agent fits (13 June 2025).

  3. Don't Build Multi-Agents (opens in a new tab)

    Walden Yan2025Article

    Used for The argument that parallel agents lacking shared context make conflicting implicit decisions.

  4. Effective context engineering for AI agents (opens in a new tab)

    Prithvi Rajasekaran, Ethan Dixon, Carly Ryan, Jeremy Hadfield2025Article

    Used for Subagents work with clean context windows and return condensed summaries, often 1,000 to 2,000 tokens (29 September 2025).

  5. Demystifying evals for AI agents (opens in a new tab)

    Mikaela Grace, Jeremy Hadfield, Rodrigo Olivares, Jiri De Jonghe2026Article

    Used for Grade what the agent produced rather than the path, and read transcripts to check graders (9 January 2026).

References

References & Sources (2 of 2)

  1. Harness engineering for coding agent users (opens in a new tab)

    Birgitta Böckeler2026Article

    Used for The human steers by iterating on the harness, and a good harness directs human attention instead of removing it (2 April 2026).