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
You can't hand the summary agent just the pull request URL and expect it to know what the style-review and security-check agents found. It needs a structured handoff document with their findings, decisions, and open questions so it starts with full context instead of re-discovering or missing them.
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 pull request 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, including findings, severity, and 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, such as annotated diff sections and references to specific lines or functions; and the current state of the pull request 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. That is why the correct answer is the structured handoff document containing each prior agent's findings, decisions, and open questions, so each subsequent agent starts with full context from its predecessors. The training-on-output-formats approach mischaracterizes how agents work. Without the actual content of prior findings in context, the summary agent cannot access that information regardless of training on format schemas. The merge-into-single-agent approach 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. The direct-file-diff approach gives the summary agent better raw material to work with but still does not provide the style analysis or security findings produced by the prior agents. The prior agents' processed insights are the missing input, not the raw source.