0PricingLogin
Claude Architect · Lesson

Subagents Don't Inherit History

Pass all needed context explicitly in each subagent prompt.

The Memory Trap

You build a hub-and-spoke multi-agent system. The coordinator has had a long conversation with the user: requirements, constraints, prior decisions. Then it delegates a task to a subagent and assumes the subagent already "knows" all of that.

It does not. This is the single most common multi-agent bug, and it appears directly on the Claude Certified Architect exam.

The rule: subagents do NOT inherit the coordinator's conversation history. Every piece of context a subagent needs must be passed explicitly in its prompt.

Why History Doesn't Transfer

The Claude API is stateless. The model keeps NO server-side memory between requests. On every turn you resend the FULL messages history yourself.

A subagent runs as its own independent loop, with its own messages array. The coordinator's history lives in the coordinator's request, not in some shared global memory. Nothing copies it across.

So when a subagent starts, its context is exactly what you put in its system prompt and first messages entry — and nothing more.

# Each agent owns its own messages array.
# Nothing is shared automatically between them.
resp = client.messages.create(
    model="claude-sonnet-4-5",
    max_tokens=2048,
    system=subagent_system_prompt,   # subagent's OWN instructions
    messages=subagent_messages,      # subagent's OWN history (starts empty)
)

All lessons in this course

  1. Hub-and-Spoke Coordinator Topology
  2. Coordinator Responsibilities
  3. Subagents Don't Inherit History
  4. Parallel Subagent Spawning
← Back to Claude Architect