What you will be able to do
- Explain where source attribution gets lost when subagent findings are compressed, handed off, or compacted
- Specify a subagent output contract that pairs every claim with its source URL or document name and a supporting excerpt
- Design a coordinator merge step that keeps and combines claim-source mappings instead of rewriting them into unsourced prose
Key concept
Claim-source mapping — A structured record that ties each individual claim to the source that backs it: a URL or document name, plus the exact excerpt that supports it. It travels with the claim through every compression and merge step, so the final report can still show which source supports which statement.
1.Where attribution gets lost
A multi-agent research system is built to compress. Anthropic describes its Research feature this way: "The essence of search is compression: distilling insights from a vast corpus." Subagents search in parallel, each in its own context window, and then condense the most important tokens for the lead agent. Compression is the reason the architecture works. It is also where provenance disappears.
The Agent SDK documentation makes the isolation explicit: "The parent receives a concise summary, not every file the subagent read." That is good for the parent's context budget. But the subagent's final message is the only record of what it found. If that message says "the market grew 14%" without naming the page, excerpt, or report behind the number, the claim-source link is gone. No later step can rebuild it, because the evidence stayed in a context that has already been thrown away.
The same loss happens at every handoff. Anthropic's guidance on multi-agent systems describes teams who "suffered from lost context at each handoff". It names "summarizing results for handoffs" as one source of overhead. Every summarization step tends to keep the gist and drop the detail, and a citation is detail.
Context compaction inside one long-running agent works the same way. In Anthropic's context-engineering cookbook, a compaction summary kept the high-level facts but dropped "three OBSCURE specifics (appendix table cells, unlikely to make the cut)". Source mappings are the kind of specific a summarizer treats as low priority. So if provenance matters, it has to be carried in a structure the summarizer is told to keep, not left to survive by chance.
Checkpoint 1 of 5· Check yourself
A coordinator's final report contains accurate findings, but none of them can be traced to a source. The subagents did read and cite real pages while they worked. What is the most likely cause?
Only a subagent's final message reaches the parent. Sources that appeared in tool results but weren't written into that message are lost at the handoff.
“The parent receives a concise summary, not every file the subagent read.”Source: code.claude.com
Checkpoint 2 of 5· Exam question
A synthesis agent combines a subagent finding that unemployment in a region is '5.1%' with another subagent finding that it is '6.3%'. The coordinator initially treats this as a contradiction requiring reconciliation, but on closer inspection the two figures come from reports published fourteen months apart. What structural change to subagent output would prevent this kind of false contradiction going forward?
Correct answer: A — Require every subagent to include the publication or data-collection date alongside each figure it extracts
- A. Correct. Attaching the publication or collection date to each figure lets the coordinator recognize that a difference reflects the passage of time rather than a genuine conflict between sources.
- B. Computing a rolling average requires more data points than a single subagent typically has access to, and it would blend the two figures rather than preserving each one with its own context.
- C. Discarding older figures throws away real information and does not solve the underlying problem of missing dates on the figures that remain.
- D. Converting exact figures into vague ranges reduces precision without addressing the actual cause of the false contradiction, which is the missing timestamp.
2.The subagent output contract: claim, source, excerpt
The fix starts with the subagent's instructions. Anthropic's lesson from building Research is that "Each subagent needs an objective, an output format, guidance on the tools and sources to use, and clear task boundaries." For synthesis work, the output format is where provenance is either kept or lost. Don't ask for "a summary of findings". Ask for a list of claims where each claim has its source URL or document name and the excerpt that supports it.
The prompting guidance supports the excerpt requirement. For long documents, ask Claude "to extract word-for-word quotes first before performing its task". The hallucination guide adds that you can make a response auditable "by having it cite quotes and sources for each of its claims." A quote plus its source is exactly the record a downstream agent needs to keep.
The Citations API shows what one such record looks like. Each citation pairs the cited text with the document it came from and the location inside that document:
{
"type": "char_location",
"cited_text": "The exact text being cited", // not counted toward output tokens
"document_index": 0,
"document_title": "Document Title",
"start_char_index": 0, // 0-indexed
"end_char_index": 50 // exclusive
}You can carry document metadata the same way when you feed sources in. The prompting guide recommends wrapping each document "with <document_content> and <source> (and other metadata) subtags". In the Citations API, the context field is described as "useful for storing document metadata as text or stringified JSON."
Prompting can still leave gaps: a subagent may skip the source on one claim. Structured outputs close that gap. They constrain the response to a schema, with "Guaranteed field types and required fields". If source and excerpt are required fields on each claim object, no claim can come back without them.
Checkpoint 3 of 5· Fill the gap
In this Citations-enabled document block, which field holds document metadata that the model sees but never cites from?
{
"type": "document",
"source": {
"type": "text",
"media_type": "text/plain",
"data": "Plain text content..."
},
"title": "Document Title",
" ? ": "Context about the document that will not be cited from",
"citations": { "enabled": true }
}context is passed to the model but isn't citable. Because title is limited in length, context is where longer metadata goes, such as an author or publication date.
3.Preserving and merging mappings in the coordinator
Structured subagent output is only half the job. The coordinator then has to keep those mappings when it combines them. Anthropic's Research system shows the pattern. Subagents return findings, and "The LeadResearcher synthesizes these results and decides whether more research is needed". When the research loop ends, the system "passes all findings to a CitationAgent, which processes the documents and research report to identify specific locations for citations." The stated goal: "This ensures all claims are properly attributed to their sources."
That design hands both the findings and the source documents to a dedicated attribution step. It doesn't hope that attribution survives the synthesis prose. In your own pipeline, the coordinator should treat claim-source records as data to merge, not text to rewrite.
When two subagents report the same fact with different wording and different sources, the safe merge keeps one claim and attaches every supporting source to it. Picking one subagent's citations throws provenance away. When a subagent finds conflicting values, it should finish its analysis and return both values with their sources and a note on the conflict. Deciding how to reconcile them belongs to the coordinator, which sees all the subagents' results, before anything goes to final synthesis.
Citations add one more guarantee. Anthropic's citations cookbook notes that the feature "will not return citations pointing to documents or locations that were not provided as valid sources." A built-in citation step can't invent a source the pipeline never had.
Checkpoint 4 of 5· Put it in order
Put the stages of Anthropic's Research pipeline in order, as the multi-agent research post describes them.
- 1.The lead agent saves its plan and creates subagents with specific research tasks
- 2.The final results, with citations, are returned to the user
- 3.Each subagent searches, evaluates tool results, and returns findings to the lead agent
- 4.All findings and documents go to a CitationAgent, which identifies citation locations
- 5.The lead agent synthesizes the findings and decides whether more research is needed
Attribution is a separate, final stage that works from the documents and the report together. It runs after synthesis, not instead of it.
“passes all findings to a CitationAgent, which processes the documents and research report to identify specific locations for citations.”Source: www.anthropic.com
Checkpoint 5 of 5· Exam question
During a competitive-intelligence synthesis, two subagents report different figures for a competitor's annual revenue: one cites a press release stating $420 million, the other cites an analyst report stating $460 million. Both sources are credible. How should the synthesis agent handle this discrepancy in the final report?
Correct answer: A — Present both figures side by side, attributed to their sources, and note that the values conflict
- A. Correct. When credible sources conflict, the synthesis should annotate the conflict with source attribution for each value rather than arbitrarily choosing one, preserving the reader's ability to judge which figure applies to their use case.
- B. Silently selecting the analyst figure discards the press release value and hides the disagreement from the reader, who has no way to know a conflict existed.
- C. Silently selecting the press release figure discards the analyst value and hides the disagreement from the reader, who has no way to know a conflict existed.
- D. Averaging invents a number that neither source actually reported and obscures the fact that a real disagreement exists between two credible sources.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.If a subagent read and cited real sources while it worked, the coordinator can always go back and recover those sources later.Why is that wrong?
Intermediate tool calls and results never leave the subagent. If the final message doesn't carry the claim-source mapping, the provenance is gone.
Covered in Where attribution gets lost
2.Telling a subagent to 'include sources where relevant' is enough to guarantee every claim comes back with one.Why is that wrong?
Prompting alone can still produce missing fields. Making source and excerpt required fields in a structured-output schema guarantees they are present.
Covered in The subagent output contract: claim, source, excerpt
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.https://code.claude.com/docs/en/agent-sdk/subagentsOfficial docs
“intermediate tool calls and results stay inside the subagent; only its final message returns to the parent.”
↩︎ Where attribution gets lost“The parent receives a concise summary, not every file the subagent read.”
↩︎ Where attribution gets lost“intermediate tool calls and results stay inside the subagent; only its final message returns to the parent.”
↩︎ Exam trap 1 - 2.
“The essence of search is compression: distilling insights from a vast corpus.”
↩︎ Where attribution gets lost“Each subagent needs an objective, an output format, guidance on the tools and sources to use, and clear task boundaries.”
↩︎ The subagent output contract: claim, source, excerpt“The LeadResearcher synthesizes these results and decides whether more research is needed”
↩︎ Preserving and merging mappings in the coordinator“passes all findings to a CitationAgent, which processes the documents and research report to identify specific locations for citations.”
↩︎ Preserving and merging mappings in the coordinator“This ensures all claims are properly attributed to their sources.”
↩︎ Preserving and merging mappings in the coordinator - 3.
“suffered from lost context at each handoff”
↩︎ Where attribution gets lost“summarizing results for handoffs”
↩︎ Where attribution gets lost - 4.https://platform.claude.com/cookbook/tool-use-context-engineering-context-engineering-toolsSecondary source
“three OBSCURE specifics (appendix table cells, unlikely to make the cut)”
↩︎ Where attribution gets lost - 5.https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-hallucinationsOfficial docs
“to extract word-for-word quotes first before performing its task”
↩︎ The subagent output contract: claim, source, excerpt“by having it cite quotes and sources for each of its claims.”
↩︎ The subagent output contract: claim, source, excerpt - 6.https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practicesOfficial docs
“with <document_content> and <source> (and other metadata) subtags”
↩︎ The subagent output contract: claim, source, excerpt - 7.
“useful for storing document metadata as text or stringified JSON.”
↩︎ The subagent output contract: claim, source, excerpt“Citations return the exact passages that support each claim, so you can verify answers and surface sources to your users.”
↩︎ Preserving and merging mappings in the coordinator“each text block can contain a claim that Claude is making and a list of citations that support the claim.”
↩︎ Key concept - 8.
“Guaranteed field types and required fields”
↩︎ The subagent output contract: claim, source, excerpt“Type safe: Guaranteed field types and required fields”
↩︎ Exam trap 2 - 9.https://platform.claude.com/cookbook/misc-using-citationsSecondary source
“will not return citations pointing to documents or locations that were not provided as valid sources.”
↩︎ Preserving and merging mappings in the coordinator