MSBA-379 · Lesson 7 of 12 · 24 min

Domain review: multi-agent orchestration

▶ Video coming soon A video version of this lesson is on the way.

Orchestrate multi-agent coordination carries 15 to 20 percent of GH-600 and has more skill groups than any other domain: four. Malik scored 2 of 5 on it in the baseline. He knew the orchestration patterns well, having helped design Skerry's code review agent team in the capstone of Memory, Evaluation and Multi-Agent Orchestration. What he missed were the operational questions: how to add an agent to a running workflow, how to replace one without disrupting work in progress, and how to retire one without losing the audit trail. "Designing a team is the fun part," Priya said. "The exam also wants you to run it on a bad day and change it on a busy one."

Domain 5 in four skill groups.
Skill groupKey bulletsFirst taught in
Operate and manage multi-agent workflowsApply an orchestration pattern; isolate agents for parallel work; detect and resolve conflictsMulti-agent patterns
Observability for multi-agent behaviorArtifacts for review and audit; document decisions, handoffs and outcomes; post-hoc analysisHanding work between agents and people; Accountability and audit trails
Detect and respond to failuresIdentify failed, partial or stalled executions; respond to degraded behavior; recovery with rollback and human-in-the-loopOperating agents in production
Manage agent lifecycleAdd agents; update or replace without disruption; retire while preserving auditabilityOperating agents in production; Case study: an agent team for code review

Orchestration patterns

The first bullet asks you to apply an orchestration pattern to coordinate multiple agents. The program taught five patterns, and the exam is likely to describe a situation and ask which fits.

Orchestration patterns and when each fits.
PatternHow it worksFits when
Sequential pipelineEach agent's output is the next agent's input: plan, implement, test, reviewStages are distinct and each needs the previous result
Orchestrator and workersOne agent breaks work into parts, assigns them, and combines resultsWork divides into independent subtasks of the same kind
Parallel fan-out and fan-inSeveral agents work on the same input at once; results are merged or comparedIndependent perspectives help, such as specialist reviewers
HandoffAn agent passes control, with context, to a better-suited agent or a personThe task changes nature partway through
Generator and criticOne agent produces, another evaluates, and the first revises within a limitQuality can be checked by a second agent before a person sees it
Four small diagrams side by side. Sequential: three boxes in a row with arrows, plan to implement to review. Orchestrator and workers: one box at top with arrows down to three worker boxes. Fan-out and fan-in: one input splitting to three specialists and merging into a summarizer. Generator and critic: two boxes with arrows both ways and a loop limit label.
Four orchestration patterns. Skerry's review team used fan-out and fan-in with a summarizer.

On GitHub, these patterns appear in several forms. In an editor, a custom agent can name subagents it may call and define handoffs to other agents, each with a label and a prompt, so a planner hands to an implementer, which hands to a reviewer. Several cloud agent sessions can run in parallel on different issues, each in its own environment. Through Agent HQ, which GitHub announced in late October 2025, third-party coding agents such as Claude and Codex can be assigned work on GitHub alongside Copilot, with a central view of agent sessions. And GitHub Agentic Workflows can chain agent jobs in Actions, with safe outputs passing results between them.

Skerry's code review team, from the previous course's capstone, is a fan-out and fan-in. Copilot code review runs on every pull request. Three read-only specialist agents look for missing tests, sensitive data in logs and input validation gaps. A summarizer combines their findings into one comment, capped at seven findings, so the human reviewer gets a short list instead of four long ones. People remain the only approvers.

Isolation for parallel execution

When agents work in parallel, they must not trip over each other. The bullet configure agent isolation for parallel execution has several layers of answer. Each agent should work on its own branch; the cloud agent does this by design, creating a copilot/ branch per task. Locally, Git worktrees let several agents work on separate checkouts of the same repository without sharing a working directory. Each agent should run in its own environment: the cloud agent and agentic workflows start fresh each time, so one agent's leftover files cannot affect another. And work should be divided so that agents own different files or areas; two agents editing the same function in parallel is a conflict waiting to happen, however good the isolation.

Detecting and resolving conflicts

The study guide names three kinds of conflict. Overlapping code changes are the obvious kind: two agent pull requests modify the same lines. Skerry met this when three agent pull requests changed the validateGiftMessage function in the checkout service in one week; Teodric, the commerce developer, had to resolve them by hand. The prevention is to assign one agent per area and to check open agent pull requests before assigning a new task in the same files. The resolution is ordinary Git work: merge one, rebase or regenerate the others against the new base, and let a person decide where intent differs.

Duplicated effort is quieter: two agents, or an agent and a person, working on the same problem. It happens when two people assign the same issue to different agents, or when an orchestrator splits work badly. Detection uses the artifacts: issues linked to more than one open pull request, or two pull requests with near-identical titles. Prevention uses assignment rules: one assignee per issue, and an orchestrator that records what it has dispatched.

Contradictory outputs happen when agents disagree: one reviewer agent says a change is fine, another says it is unsafe. The answer is not to pick one at random or to average. A summarizer can be instructed to surface contradictions explicitly rather than hide them, and a rule decides who resolves them: for Skerry, any contradiction about security goes to a person on the application security team. In exam terms, contradictory outputs are a human-in-the-loop trigger.

Worked problem

Two agents, one function

Two developers at Skerry assign separate issues to the cloud agent on the same morning: one to add logging to the payment retry function, one to change its retry limit. Both pull requests modify the same twenty lines. What should the team change, in the terms of this domain?

Show solution
  1. This is an overlapping code change caused by parallel work in the same area.
  2. Isolation by branch worked; division of work did not.
  3. Detection: before assigning, check open agent pull requests touching the same files; a simple automation can comment when two open agent pull requests change the same file.
  4. Resolution now: merge one, have the agent rebase or regenerate the other against the new base, and have a person review the combined behavior.

Answer: Add a pre-assignment check and an automated overlap warning, sequence related tasks, and resolve the current conflict by merging one and regenerating the other.

Observability for multi-agent behavior

With several agents, observability means being able to answer afterwards: which agent did what, on whose behalf, with which configuration, and what it passed to whom. The outline asks for three things. First, artifacts suitable for review and audit: each agent's output should land somewhere durable, such as a pull request comment, a job summary or a file, and be attributable to that agent. Skerry labels every agent pull request automatically and adds a footer to the summary comment naming the commit of the agent configuration that produced it, so a finding can be traced to the exact instructions in force.

Second, documenting key decisions, handoffs and outcomes: when one agent hands to another or to a person, the handoff should carry a short record of what was done, what was decided and what remains, in the same structured form lesson 5 used for state. Third, post-hoc analysis: after an incident or periodically, someone reads the artifacts and the audit log to understand what the agents did together. GitHub's audit log records agent activity with an identifier for the agent and the person it acted for, and its agent sessions view lists sessions across the enterprise, including those of third-party agents.

Failures and degraded behavior

Multi-agent systems fail in three shapes, and the outline names all three: failed executions, which stop with an error; partial executions, which finish only part of the work; and stalled executions, which neither finish nor fail. Failed ones are the easiest to see, because the session or job reports failure. Partial ones are found by comparing the output with the plan: three of five subtasks done. Stalled ones need a timeout or a heartbeat: if an agent has made no progress for a set time, it is treated as stalled and stopped.

Degraded behavior is worse than failure because nothing reports it. The agents run, but the results get worse: the summarizer starts dropping findings, a specialist begins flagging everything, a model change makes one agent verbose. Detection relies on the evaluation signals from lesson 6, tracked over time: Skerry runs a 25-task smoke set whenever a shared agent changes and a 300-task set weekly. The response is graded: reduce reliance on the degraded agent, fall back to a previous configuration or a simpler path, and if needed pause it while people take over its part.

A decision flow for a multi-agent run. Start: run status. If failed: retry once if transient, otherwise escalate to a person. If partial: record what finished, re-plan the rest or hand to a person. If stalled: stop after the timeout, keep artifacts, restart from the last good state. If degraded: compare with smoke set, fall back to the previous configuration, pause the agent and notify the owner. All paths end at a box: record the incident and run post-hoc analysis.
Recovery paths by failure shape. Every path ends with a record and an analysis.

Recovery patterns include rollback and human-in-the-loop, as the study guide says. Rollback for agent work usually means closing or reverting pull requests, which is why agents should work on branches; for configuration, it means restoring the previous agent definition, which is why definitions should be versioned in Git. Human-in-the-loop recovery means a person takes over the stuck part, decides a contradiction, or approves a restart. A good recovery plan also says when not to retry: an agent that fails the same way twice should not be retried a third time without a change.

Managing the agent lifecycle

This was the group Malik had missed, and Priya spent the second half of the session on it. The outline has three bullets: add agents, update or replace them without disrupting active workflows, and retire them while preserving auditability and continuity.

Adding an agent to an existing workflow should be gradual. Skerry's practice is to run a new agent in shadow mode first: it runs alongside the workflow, its output is recorded but not shown to developers, and its results are compared with the rest. After the smoke set and a period of shadow runs, it is enabled for a small group, then widely. The agent's definition is added through a pull request, reviewed by its owners in CODEOWNERS.

Updating or replacing an agent without disrupting active workflows depends on versioning. Agent definitions live in Git, so every change is a commit, reviewed and reversible. Runs already in progress should finish on the configuration they started with; new runs pick up the new version. A replacement agent can be introduced in shadow mode beside the old one and switched over once it performs at least as well on the smoke set. Changing an agent's definition in place while long sessions are running is the anti-pattern, because a session can end up with instructions from two versions.

Retiring an agent while preserving auditability means stopping new work without destroying the record of old work. Disable the agent for new sessions; let active ones finish or hand them over; keep its definition in the repository's history, or move it to an archive folder, rather than deleting all trace; record the decision and the reason; and remember that its past sessions and audit log events remain subject to the platform's retention periods, so export anything an audit may need for longer. Continuity means the work the agent did is picked up by something: another agent, a person or a deliberate decision to stop doing it.

Worked problem

Replacing the summarizer

Skerry wants to replace its review summarizer with a new version that groups findings by severity. Reviews run on about eighty pull requests a day. How should it make the change without disrupting reviews in progress, and how will it know the new version is better?

Show solution
  1. Commit the new definition beside the old one, reviewed by its owners.
  2. Run the new summarizer in shadow mode for a week, producing comments that are recorded but not posted.
  3. Compare on the smoke set and on the shadow week: findings kept, findings dropped, reviewer ratings.
  4. Switch new runs to the new version; let runs in progress finish on the old one.
  5. Keep the old definition in history and record the decision.

Answer: Version, shadow, compare, switch for new runs only, and record. The evaluation signals from lesson 6 decide whether it is better.

How the domain is tested

Expect scenarios with several agents and a symptom: two pull requests colliding, an agent that never finishes, a sudden change in review quality, a request to add or remove an agent. The distractors include doing everything at once (replacing an agent for all runs immediately), removing records (deleting a retired agent's definition and history), and treating every problem as a retry. Malik's card read: "Pattern by task; isolate by branch, environment and area; detect by artifacts; change by version; retire with records."

Common mistakes

  • MistakeRunning parallel agents in the same area of code.

    InsteadIsolate by branch and environment, and divide work so agents own different files.

  • MistakeResolving contradictory agent outputs by picking one.

    InsteadSurface contradictions and route them to a person by a defined rule.

  • MistakeEditing an agent definition in place while sessions are running.

    InsteadVersion definitions in Git; new runs use the new version, active runs finish on the old.

  • MistakeDeleting a retired agent and its records.

    InsteadDisable new sessions, keep the definition in history, record the decision and export audit data you need.

  • MistakeWaiting for a stalled agent indefinitely.

    InsteadUse timeouts or heartbeats and restart from the last good state.

Summary and key terms

  • Domain 5 carries 15 to 20 percent across four groups: workflows, observability, failure response and lifecycle.
  • Choose a pattern by task: sequential, orchestrator and workers, fan-out and fan-in, handoff, or generator and critic.
  • Isolate parallel agents by branch, environment and area; detect overlapping changes, duplicated effort and contradictory outputs.
  • Make multi-agent work auditable with attributable artifacts, recorded handoffs and post-hoc analysis; identify failed, partial and stalled runs and degraded behavior.
  • Add agents in shadow mode, update by version without disrupting active runs, and retire them while keeping the audit trail.
Orchestrator
An agent that divides work, dispatches it to other agents and combines the results.
Shadow mode
Running a new or changed agent alongside the live workflow with its output recorded but not used.
Stalled execution
An agent run that neither finishes nor fails, detected by a timeout or lack of progress.
Degraded behavior
A decline in the quality of agent results without any failure being reported.
Git worktree
A separate working directory attached to the same repository, useful for isolating parallel local agents.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Name the three kinds of conflict in the study guide.

    Show answer

    Overlapping code changes, duplicated effort and contradictory outputs.

  2. How do you detect a stalled agent?

    Show answer

    With a timeout or heartbeat that flags no progress for a set time.

  3. What is shadow mode?

    Show answer

    Running an agent alongside the workflow with its output recorded but not used.

  4. What should happen to runs in progress when an agent definition changes?

    Show answer

    They finish on the version they started with; new runs use the new version.

  5. Which pattern fits several specialist reviewers whose findings are combined?

    Show answer

    Fan-out and fan-in, with a summarizer.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz