---
title: "Your Agents Don't Share a Brain. They Pass Notes."
canonical_url: "https://cognilium.ai/blogs/multi-agent-context-handoffs"
slug: "multi-agent-context-handoffs"
section: "blogs"
date_published: "2026-07-06"
date_modified: "2026-07-06"
word_count: 2172
reading_time_minutes: 10
author: "Mudassir Marwat"
author_identifier: "0009-0008-1927-2598"
person_same_as:
  - "https://www.linkedin.com/in/mudassir-marwat/"
  - "https://orcid.org/0009-0008-1927-2598"
  - "https://github.com/mudassirmarwat"
  - "https://medium.com/@mudassir-marwat"
  - "https://www.youtube.com/@mudassir-marwat"
  - "https://dev.to/mudassirmarwat"
  - "https://hashnode.com/@mudassirmarwat"
  - "https://huggingface.co/mudassirmarwat"
  - "https://bsky.app/profile/mudassir-marwat.bsky.social"
  - "https://substack.com/@mudassirmarwat"
  - "https://topmate.io/mudassirmarwat"
  - "https://fueler.io/mudassirmarwat"
  - "https://www.instagram.com/mudassirmarwat/"
  - "https://www.facebook.com/mudassir.marwat"
  - "https://www.reddit.com/user/mudassirmarwat/"
  - "https://www.f6s.com/member/mudassir-marwat"
  - "https://cognilium.ai/founder"
entities: []
related:
  - "https://cognilium.ai/blogs/multi-agent-architecture-patterns"
  - "https://cognilium.ai/blogs/evaluating-multi-agent-systems"
  - "https://cognilium.ai/blogs/agent-working-memory-context-window"
---
# Your Agents Don't Share a Brain. They Pass Notes.

You wired the agents, and you learned the failures live in the seams between them. This chapter names the seam: it is the hand-off. When one agent finishes and the next begins, everything the first learned, its documents, its discarded hypotheses, its doubt, has to survive a trip through a single message, and the next agent acts on that message alone. Your agents do not share a brain, they share a mailbox, and every message is a lossy compression of what the sender knew. Four things go wrong: context loss, semantic drift, error laundering, and a coordination tax that grows with the square of the chain length. The fix is not a better prompt. It is a shared, typed store the agents read and write, plus hand-off contracts that make a bad message fail loudly instead of quietly.

In [chapter one](https://cognilium.ai/blogs/multi-agent-architecture-patterns) you wired the agents. In [chapter two](https://cognilium.ai/blogs/evaluating-multi-agent-systems) you learned that a multi-agent system fails in the seams between agents, not inside any one of them. This chapter names the seam. It is the hand-off.

Here is what a hand-off actually is. Agent A finishes its work and agent B begins. Everything A learned, its retrieved documents, its discarded hypotheses, its confidence that the answer was shaky, has to survive a trip through a single message. B does not see A's mind. B sees the note A wrote. If the note is incomplete, or B reads it differently than A meant it, then B does careful, competent work on bad input. Nothing throws. Nothing turns red. The system hands your user a confident wrong answer, and every individual agent passes its own unit test.

Your agents do not share a brain. They share a mailbox. And every message dropped in that mailbox is a lossy compression of everything the sender knew, written by an agent that is guessing about what the receiver will need. That compression is where the reliability goes, and almost nobody is measuring the loss.

## TL;DR

A hand-off is the moment one agent compresses its full working state into a message and the next agent acts on that message alone. Four things go wrong. The sender drops context it never thought to include (context loss). The receiver reads the words differently than the sender meant them (semantic drift). An uncertain guess arrives stripped of its confidence and gets trusted as fact (error laundering). And the naive fix for the first three, carrying everything forward, re-sends the growing context at every step, so token cost climbs with roughly the square of the chain length (the coordination tax). The repair is not a better prompt. It is a shared, typed store the agents read and write, plus hand-off contracts that make a bad message fail loudly instead of quietly. Passing state through free-text messages is the most expensive default in multi-agent design.

## A hand-off is lossy compression, and no one budgeted for the loss

Start with the single-agent case, because it is the honest baseline. One agent accumulates its state in one context window. Nothing is lost between steps, because there are no steps in the sense that matters, there is one continuous working memory. The only thing that gets lost is what falls out of the window when it overflows, which is a real problem and the subject of [why a bigger context window will not save your agent](https://cognilium.ai/blogs/agent-working-memory-context-window). But within the window, the agent at step nine can see everything it knew at step one.

A multi-agent system deliberately throws that away. You partitioned the work across agents precisely so that each one carries a focused, smaller context. That partition is the entire reason to go multi-agent, and it is also the reason the union of what the system knows is never in one place. No single agent holds the whole picture. The hand-off message is the only channel between the pieces, and a message is always smaller than a mind.

A worked example from document-heavy work, the kind we build for legal and insurance teams. A classifier agent reads a contract, tags clause 14 as indemnification, and hands the review agent the string "clause 14: indemnification." What it did not put in the note: that its own confidence on that label was 0.55, not 0.95. That clause 14 pulls its definitions from clause 9, so reviewing it in isolation is meaningless. That two other clauses matched indemnification weakly and might be the real one. The review agent receives three clean words and treats them as certain, self-contained truth. It writes a careful review of the wrong clause, at full confidence. The bug is not in the classifier and not in the reviewer. The bug is in the note, and in the fact that the note had no room for doubt.

## The four ways a hand-off fails

**Context loss.** The sender omits what it did not know the receiver would need. This is the most common and the hardest to catch, because the receiver cannot ask for information it does not know exists. The classifier above did not withhold the confidence score maliciously. It just was not asked to carry it, so it did not.

**Semantic drift.** The same words mean different things to sender and receiver. A research agent reports "done." It means "I stopped looking." The orchestrator reads "done" as "the answer is complete and correct." Both are behaving correctly against their own understanding of the word. The system is wrong anyway. This is the failure that survives every code review, because the code is fine, the shared vocabulary is not.

**Error laundering.** An uncertain guess crosses a boundary and comes out clean. Confidence, provenance, and hedging are exactly the fields that get dropped first when an agent compresses its state into a message, because they feel like metadata. So a 0.55 becomes an unqualified assertion the moment it is spoken, and every downstream agent inherits a false certainty. This is the mechanism behind the correlated errors that chapter two warned about, and it is the same disease that runtime [grounding against a domain vocabulary](https://cognilium.ai/blogs/anti-hallucination-domain-vocabulary-grounding) fights inside a single agent. Across agents, the boundary itself is the launderer.

**The coordination tax.** The obvious defense against the first three is to carry everything forward, give every agent the full accumulated context so nothing is dropped. That trades a reliability problem for a cost problem, and the cost problem is quadratic.

## Do the math on the coordination tax

Take a linear chain of N agents. The base task is B tokens of context. Each agent produces O tokens of output that every later agent must also see. In the naive "append everything" pattern, agent number k reads the base task plus every prior output, so its input is B + (k - 1) times O tokens.

Sum that across the whole chain and the total input the system pays for is N times B, plus O times N times (N - 1) over 2. The first term is linear waste, you re-read the base task once per agent. The second term is the tax, and it grows with the square of the chain length.

Put real numbers on it. Say the base task is 2,000 tokens and each agent adds 1,000 tokens the next ones must carry.

> Three agents: 9,000 input tokens processed. Five agents: 20,000. Ten agents: 65,000. A single agent doing the same work reads the context roughly once, on the order of 12,000 tokens even at ten agents' worth of output. By ten agents in a chain, the naive multi-agent design is paying five times the tokens, and almost all of the excess is the same context re-sent over and over.

The re-sent tax alone, that O times N times (N - 1) over 2 term, is 3,000 tokens at three agents, 10,000 at five, and 45,000 at ten. It is pure repetition. It buys nothing. At an illustrative few dollars per million input tokens, one run is cheap, but a system that runs 100,000 times a month turns 45,000 wasted tokens per run into billions of tokens of pure re-send, which is real monthly spend for zero added capability. And that is before latency: every hand-off is a serial model call, so a five-agent chain pays five round trips of network and inference time stacked end to end, and the context each one chews through is growing as it goes.

Now notice the trap. You can cut the tax by pruning what you carry forward, but pruning is just context loss on purpose. You save tokens by dropping context, and now the receiver is missing the thing it needed. The coordination tax and context loss are the same dial viewed from two sides: how much of the growing state do you drag through every hand-off. Turn it up and you pay quadratically. Turn it down and you lose information. Passing state through messages forces you to choose. The fix is to stop choosing.

![How a hand-off between two agents loses information, and why the naive fix is quadratic. Across the top, a mechanic strip: Agent A holds a full working state, its clause label plus a confidence of 0.55 plus references plus two weaker matches plus its reasoning; that state is compressed into a note that reads only "clause 14: indemnification"; and Agent B acts on those three clean words as if they were certain, with no error thrown. Below on the left, the four ways a hand-off fails: context loss, where the sender omits what it did not know you would need and the receiver cannot ask for it; semantic drift, where "done" means "I stopped" but the orchestrator reads "it is correct"; error laundering, where confidence and provenance are dropped first so a 0.55 arrives as a fact; and the coordination tax, where carrying everything forward makes token cost grow with the square of the chain length. On the right, the tax is quadratic: in the naive append pattern three agents process about 9,000 input tokens, five agents about 20,000, ten agents about 65,000, while a single agent reads the context about once for roughly 12,000, and the tax term equals the per-agent output times N times N minus one over two, which is pure re-send that buys nothing. A green band states the fix: coordinate through a shared, typed store rather than through messages, which removes the re-send tax, keeps the full record including confidence and provenance, makes bad writes fail against a schema at the boundary, and records every read and write so the store is already the trajectory audit log. The takeaway: passing state through free-text messages is the most expensive default in multi-agent design, and shared state plus typed hand-off contracts turn silent interaction bugs into loud, caught exceptions.](https://cdn.sanity.io/images/dvtayvlm/production/557e74a586f757debf0dc86a7029b2577313d812-1200x772.svg?w=1200&auto=format)

## The fix is a shared store, not a better message

The instinct, when hand-offs leak, is to write better hand-off prompts. That treats the symptom. The structural repair is to stop passing state through messages at all. Give the agents a shared, structured store they read and write, a blackboard, and let the message shrink to a pointer: "I updated the record for clause 14," not the entire payload of what clause 14 now is.

This dissolves the dilemma instead of managing it. Context lives in one place, so no agent re-sends it and the quadratic tax disappears, agents read only the fields they need, when they need them. Nothing is lost, because the receiver can pull the sender's full record, including the 0.55 confidence and the reference to clause 9, rather than only the three words the sender chose to speak. And because the store is typed, a record has a shape: an id, a label, a confidence, a list of references, a source span. A write that violates the shape fails at the moment it is attempted, not three agents downstream.

The blackboard is not a new idea. It goes back to the Hearsay-II speech system in the 1970s, where independent knowledge sources cooperated by reading and writing a shared structured space rather than calling each other directly. The modern version is a typed, versioned state object, but the insight is the same and it is worth stealing: agents that coordinate through shared state instead of direct messages do not accumulate hand-off failures, because there is no lossy hand-off to fail.

There is a bonus that chapter two set up. The shared store, if every read and write is recorded, is the trajectory trace. It is the audit log you needed to answer "where did it break," produced for free as a byproduct of coordinating this way. You were going to have to build observability anyway. Build it as the coordination substrate and you get both for one.

## Typed hand-off contracts: make the seam fail loudly

Even with a shared store, agents still signal each other. Someone says "your turn," someone says "I am done, the record is ready." Make those signals typed too. A hand-off contract states what the sender guarantees is true, what the receiver requires before it will act, and what happens when the guarantee is missing.

In practice this is a schema check at the boundary. If the research agent signals "done" but its record has no populated answer field, the contract rejects the hand-off right there. Semantic drift and error laundering, the two silent failures, become caught exceptions the instant they occur. This is where you also decide the response, retry the sending agent, escalate to a human, or fail the run, which is the same partial-failure discipline that keeps a [3,300-call agent pipeline](https://cognilium.ai/blogs/agent-pipeline-failure-recovery-dynamodb-sqs) alive when one step misbehaves. A schema check is cheap to write and it converts a class of invisible bugs into loud ones, which is the best trade in this entire discipline.

## What this means for how you wire the system

Bring it back to [the four topologies](https://cognilium.ai/blogs/multi-agent-architecture-patterns). The number of hand-offs, and therefore the size of the tax and the surface area for loss, is a property of the topology you chose. A supervisor hub routes every hand-off through one coordinator, which keeps the trace clean but sends context round-tripping through the center. A sequential pipeline minimizes hand-off count but serializes everything and forbids parallelism. A shared store cuts the knot: agents coordinate through state rather than through each other, so you can add an agent without adding a hand-off to every other agent.

The design rule falls out of the math. The more agents you add, the more you should coordinate through shared state and the less you should pass through messages, because message-passing hand-offs grow super-linearly in both cost and failure surface while shared-state reads do not. If you find yourself writing longer and longer hand-off prompts to stop the leaks, that is the signal that you have outgrown message passing and the state belongs in a store.

## The one-sentence version

The failure chapter two located "in the seams" has a name, the hand-off, and the hand-off is lossy compression you are neither measuring nor budgeting for. Repair it structurally with a shared typed store and hand-off contracts, not with better prose in the prompt. This is also, quietly, the reason so many multi-agent systems [would have worked better as one agent](https://cognilium.ai/blogs/multi-agent-vs-single-agent): the team paid the coordination tax and absorbed the hand-off losses without ever deciding to.

Cognilium AI builds production multi-agent systems for document-heavy operations in legal, finance, and insurance, the places where a confident wrong answer is expensive. If your agents are handing each other clean-looking notes and quietly losing the truth in between, the seam is almost always the hand-off. [Talk to an engineer](https://cognilium.ai/contact) or see [what we build](https://cognilium.ai/services).

## Frequently asked questions

### What is a hand-off in a multi-agent system?

It is the point where control and context pass from one agent to the next. The receiving agent acts on the message it is handed, not on the sender's full internal state, so the quality of the hand-off, not the intelligence of either agent, often decides whether the system is correct.

### Why do multi-agent systems lose information between agents?

Because each agent's knowledge is partitioned by design and the only channel between them is a message, which is a lossy compression of what the sender knew. The sender decides what to include with incomplete knowledge of what the receiver needs, so confidence scores, provenance, and cross-references are routinely dropped at the boundary.

### How much does multi-agent coordination overhead cost?

In the naive pattern where each agent carries the full accumulated context forward, total input tokens grow with roughly the square of the chain length. For a five-agent chain over a 2,000-token base with 1,000-token outputs, that is about 20,000 input tokens versus roughly 12,000 for a single pass, and the gap widens fast: a ten-agent chain pays around five times the tokens, almost all of it the same context re-sent. A shared store reads context about once and removes the tax.

### What is the blackboard pattern?

A shared, structured store that agents read from and write to instead of passing state through direct messages. It dates to the Hearsay-II system in the 1970s. It removes the re-send tax, preserves each agent's full record including confidence and provenance, makes bad writes fail against a schema, and doubles as the trajectory audit log you need to debug the system.

### Do typed hand-off contracts slow development down?

No. A hand-off contract is a schema check at the boundary between agents. It is cheap to write and it converts silent interaction bugs, the ones that pass every unit test and surface as confident wrong answers in production, into caught exceptions at the exact moment they occur. It saves far more debugging time than it costs.

### Should I use direct agent-to-agent messages or a shared store?

Direct messages are fine for a short chain of two or three agents with no auditability requirement. Move to a shared store as soon as you have more than a few agents, any need to trace what happened, or any hand-off prompt that keeps growing to plug leaks, because both the coordination cost and the failure surface of message passing grow super-linearly while shared-state reads stay flat.

---

Canonical HTML: https://cognilium.ai/blogs/multi-agent-context-handoffs
