A multi-agent pipeline processes pull requests in stages: Agent A reviews code style, Agent B checks security, and Agent C generates the final review summary. Agent A and B complete and pass the PR to Agent C. Agent C produces a summary that contradicts findings from Agent A, misses a critical security note from Agent B, and asks questions that Agent A already answered. The orchestrator passed only the PR URL between agents, not the prior agents' findings. What was missing?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Handing off only the address of a house — not what the previous inspectors found inside it — means the next inspector walks in blind. Agent C needs more than the PR URL; it needs Agent A's style findings, Agent B's security notes, and the open questions each raised, structured so Agent C can integrate them rather than re-discover (or miss) them.
Full explanation below image
Full Explanation
Structured handoff documentation is the mechanism that preserves context across agent transitions in a multi-stage pipeline. When the only shared context is the original input (the PR URL), each downstream agent starts from scratch and may duplicate work, miss upstream findings, or contradict decisions already made.
A structured handoff document includes: - A summary of what each prior agent found (findings, severity, confidence) - Decisions made by prior agents and their rationale - Open questions that the next agent should address or is explicitly NOT expected to address - Artifacts produced (annotated diff sections, references to specific lines or functions) - The current state of the PR as understood by prior agents
This document is passed as input context to each subsequent agent, either prepended to its prompt or provided as a structured tool result.
Option A (training on output formats) mischaracterizes how agents work. Without the actual content of prior findings in context, Agent C cannot access that information regardless of training on format schemas.
Option C (merge into single agent) is a design trade-off with real costs: it eliminates specialization, increases the agent's complexity and context requirements, and may reduce quality for each specialized task. Structured handoffs are the preferred solution for preserving context across specialized agents.
Option D (file diff instead of PR URL) gives Agent C better raw material to work with but still does not provide Agent A's style analysis or Agent B's security findings. The prior agents' processed insights are the missing input, not the raw source.