AI Skill Certs
Agentic Architecture & Orchestration·Task 1.3·Bloom: apply·Difficulty 3/5·9 min read·Updated 2026-06-07

Structured Context Passing Between Claude Subagents

Configure subagent invocation, context passing, and spawning

SUBy Solomon UdohReviewed by Solomon UdohAI-assisted · human-reviewed
In short
Structured context passing means handing a subagent everything it needs inside its prompt, with content separated from its metadata such as source URLs, document names, and page numbers. Because a subagent starts in a fresh context and inherits none of the parent conversation, anything you do not put in the prompt is simply unavailable to it.

Why structured context passing exists

Structured context passing solves a problem that only appears the moment you delegate. A subagent does not share the coordinator's memory. Its context window starts fresh, and the single channel from parent to child is the prompt string you pass with the spawn. The official guidance is blunt about this: include any file paths, error messages, decisions, and findings the subagent needs directly in that prompt, because nothing else reaches it. If you assume the subagent can see what the coordinator just learned, you have already designed a bug.

So the question is not whether to pass context, it is how. Hand a subagent a flat wall of prose and it will do useful work but lose track of where each fact came from. Hand it the same findings with each item tagged by its origin, and that provenance survives the handoff. That difference, raw text versus structured findings, is the entire knowledge point, and it is why this sits at the apply level rather than mere recall.

Structured context passing
Supplying a subagent with complete prior findings inside its prompt, formatted so that each piece of content travels with its metadata: the source URL, document name, page number, or claim identifier it came from. This preserves attribution as work moves through a multi-agent pipeline.

What a subagent does and does not inherit

To pass context well you have to know exactly what the subagent already has. It receives its own AgentDefinition prompt, the spawn prompt you write, project-level memory when that is enabled, and the tool definitions it is allowed to use. It does not receive the parent conversation history, the parent system prompt, or any of the tool results the coordinator gathered along the way. The boundary is deliberate: this isolation is what keeps the coordinator context clean, a property you studied in subagent context isolation.

The practical consequence is that the spawn prompt has to be self-contained. A reference to "the file we were looking at" means nothing to a worker that never saw the earlier turn. Spell out the path. Quote the error. Paste the finding. The subagent can only reason about what is physically in front of it, and you are the only thing that puts it there.

Separating content from metadata

The structured part of structured context passing is the separation of what was found from where it was found. Imagine a research subagent that discovered three relevant facts. The weak handoff is a paragraph that blends all three into smooth prose. The strong handoff keeps each fact as its own item carrying a source field: the URL, the document title, the page or section, maybe a confidence note. The content and its provenance stay welded together rather than melted into a story.

This matters because attribution is not recoverable once it is gone. A later synthesis agent can only cite a claim if the claim still points at its origin when it arrives. Keep the metadata attached and the citation is mechanical; flatten it into prose and the synthesis agent is left guessing, or worse, inventing. The same principle scales up into structured claim-source mappings and the broader idea of attribution preservation through the pipeline.

prompt only
the single channel into a fresh subagent
content + source
what a structured handoff keeps paired
0 history
parent turns a subagent inherits

Designing a good handoff

A reliable handoff reads like a briefing, not a chat. State the goal, supply the relevant prior findings as discrete items with their sources attached, and name what the subagent should produce. Because the subagent will run independently and report back only a summary, the structure you impose on the way in is what shapes the quality you get on the way out. A token-bounded, structured request also nudges the worker to return a structured, attributable answer rather than an unsourced narrative.

Structured versus unstructured context passing
Loading diagram...
The same findings survive or lose their provenance depending purely on how they are structured at the handoff.

A practical shape for structured findings

It helps to picture the format concretely. A structured finding is a small record rather than a sentence: a claim holding the actual content, a source holding the URL or document name, an identifier so the claim can be referenced later, and optionally a confidence note or a page or section locator. A subagent that returns a list of these records hands the next stage everything it needs to attribute, quote, and verify. The contrast with a paragraph is stark: a paragraph reads beautifully and attributes nothing, while a list of records reads plainly and attributes everything.

There is a useful side effect to asking for this shape. Requesting a bounded, structured answer nudges the worker to prioritise and filter rather than dump raw material, so you tend to get a tighter, more useful summary as well as a traceable one. The structure is not bureaucratic overhead; it is the thing that makes the output both shorter and more trustworthy. For the apply level this knowledge point sits at, you should be able to take a vague "pass the findings along" instruction and turn it into a concrete record shape that survives the handoff.

Context passing across more than two hops

Real pipelines are rarely just coordinator-to-worker. Findings often travel through several stages: a retriever feeds a ranker, which feeds a synthesiser, which feeds a report writer. Provenance has to survive every one of those hops, not just the first. The discipline is therefore compounding: each stage must both preserve the metadata it received and attach metadata to anything new it produces. One careless hop that flattens the records into prose breaks the chain for everything downstream of it, no matter how careful the other stages were.

This is why structured context passing is treated as a pipeline-wide invariant rather than a single-step trick, and why it connects forward to Domain 5 topics such as upstream agent optimisation, where improving an early agent's structured output lifts the quality of everything that depends on it. Think of the structured record as a baton in a relay: it only finishes the race if every runner keeps hold of it. Designing each handoff to keep the baton intact is the architect skill this knowledge point is building toward.

When findings outgrow the prompt

Pasting every prior finding into the spawn prompt works until the findings get large. A long-horizon pipeline can accumulate more material than it is sensible to copy into one prompt, and at that point the discipline shifts from what to include to where to keep it. The rule that does not change is that a subagent has no implicit shared memory: it sees its own prompt plus basic environment details such as the working directory, and nothing else from the parent run. So scale does not buy you a backchannel, it only raises the cost of the single channel you already have.

Two grounded mechanisms answer this without inventing shared state. The first is to persist findings to an external store, a technique Anthropic calls structured note-taking or agentic memory, where each agent writes its results to a file or record outside the context window and the next stage reads only the slice it needs. The provenance discipline still applies in full: those notes must keep every claim paired with its source, or you have simply moved the attribution loss into a larger container. The second is to continue a single worker's own thread by resuming it rather than re-spawning a fresh instance, which preserves that worker's accumulated history; resuming as a session operation is covered under fork session for divergent exploration.

The architect's takeaway is that context passing remains the contract even when the prompt cannot hold everything. You either pass the findings directly, structured and sourced, or you pass a precise pointer to where they are persisted, structured and sourced. What you never get is a subagent that silently shares the coordinator's memory, so an external store with its metadata intact is the honest way to scale a pipeline beyond what one prompt can carry.

How this is tested on the exam

Task statement 1.3 questions on this knowledge point are applied: they hand you a pipeline that is producing unsourced or mis-sourced output and ask what to change. The right move is almost always upstream, at the moment context is passed, not at the synthesis agent that merely surfaces the problem. You should be ready to recognise that a subagent forgetting earlier context is expected behaviour, and that the remedy is a richer, structured spawn prompt rather than some imagined shared memory.

Expect distractors that suggest server-side state, larger context windows, or instructing the final agent to try harder. None of those address the real channel. The exam rewards the candidate who knows that the prompt string is the only doorway and that what passes through it must carry its own provenance.

Worked example

A market-research coordinator spawns a synthesis subagent to write a competitor brief, but the brief states figures with no sources, making it impossible to verify.

The coordinator first runs three research subagents, one per competitor. Each returns a tidy paragraph of findings. The coordinator then concatenates those three paragraphs into the synthesis subagent prompt and asks for a one-page brief. The brief comes back fluent and confident, asserting pricing and headcount numbers with no way to check any of them.

Nothing in the system errored. The synthesis subagent did exactly what it was asked: it summarised prose. The problem is that the prose it received had already lost its sources at the previous handoff. Each research paragraph blended its facts together, so by the time the synthesis worker saw them there was no URL or document attached to any number.

The fix lives upstream. Have each research subagent return findings as discrete items, every claim paired with its source URL and a short identifier, and pass that structured set into the synthesis prompt unflattened. Now the synthesis worker can carry each figure with its citation, because the structured context passing preserved the link the whole way down. The repair is in how context is passed, not in scolding the final agent.

Common misreadings to avoid

Misconception

Subagents share the coordinator conversation, so I do not need to repeat earlier findings in the spawn prompt.

What's actually true

A subagent inherits none of the parent conversation history or tool results. The spawn prompt is the only channel in, so any finding the subagent needs must be placed directly in that prompt.

Misconception

Passing the raw text of prior findings is sufficient context for a subagent.

What's actually true

Raw text without structured metadata strips the link between each claim and its source. That is the leading cause of attribution loss downstream, because the synthesis agent has no provenance to cite. Pair every finding with its source data.

Where this leads next

Get structured context passing right and two harder topics open up. Diagnosing why a finished report has unsourced claims becomes a matter of inspecting the handoffs, which is exactly diagnosing attribution loss in synthesis. And the same discipline of self-contained, structured prompts is what makes goal-based prompts and parallel subagent spawning reliable, because every worker you launch is only ever as good as the briefing it carries in.

If you internalise one habit from this knowledge point, make it this: write every spawn prompt as though the reader knows nothing about the work so far, because that is literally true. The subagent has no memory of the conversation, no view of the coordinator reasoning, and no access to the tool results gathered earlier. Spell out the goal, paste the relevant findings as structured records with their sources attached, and name the output you expect. A handoff written to that standard is what turns a brittle multi-agent design into a dependable one, and it is the single behaviour most likely to separate a pipeline that attributes cleanly from one that quietly loses its sources. Treat the prompt as the whole contract, because for the worker on the other side of it, that is exactly what it is.

Check your understanding

A research pipeline produces a final summary whose claims cannot be traced to any source. Each subagent returns fluent prose, and the coordinator concatenates that prose into the synthesis prompt. What change best preserves attribution?

People also ask

What does a Claude subagent inherit from its parent?
Its own system prompt and the spawn prompt, project memory if enabled, and its tool definitions. It does not inherit the parent conversation history, the parent system prompt, or earlier tool results.
Why separate content from metadata when passing context?
So each claim stays linked to its origin. When the source URL, document name, or page number travels with the content, the synthesis step can cite it; once flattened into prose, that link is gone.
Is passing raw text to a subagent enough?
Usually not. Unstructured text is the main cause of attribution loss downstream, because no claim can be followed back to its source. Pair findings with structured source metadata instead.

Watch and learn

Official Anthropic Academy lessons first, then hand-picked walkthroughs. Videos load only when you press play.

Official · Anthropic AcademyOpen full lesson in Academy

Designing effective subagents

Why watch: Passing complete prior findings with metadata is how good design preserves attribution downstream.

More videos for this concept

References & primary sources

Adaptive study

Master this concept with Archie

Practice it inside an adaptive study session. Archie, your Socratic AI tutor, tracks your mastery with Bayesian Knowledge Tracing and schedules the perfect next review.

Start studying