Multi-Agent Shared Memory: What Agents Should Share, How to Scope It, and How One Agent Poisons the Rest

AI Agent MemoryClaude Code & Coding AgentsGaurav Dadhich28 October 202640 min read
Multi-Agent Shared Memory: What Agents Should Share, How to Scope It, and How One Agent Poisons the Rest
On this page
  1. What multi-agent shared memory is, and what it is not
  2. Why messages are not memory: a rejection has to be stored, not remembered
  3. When a multi-agent system needs shared memory, and when it does not
  4. Inside one run: typed tables with a clear writer beat a shared scratchpad
  5. After the run: which notes become what the team remembers next week
  6. Orchestration state, handoffs and shared memory are different layers
  7. What agents should share, and what they should keep private
  8. Scope: per-agent, per-run, per-team, per-user, per-tenant, global
  9. Scope first, then retrieve: more memory is not better memory for mixed work
  10. Multi-user agents: permissions have to follow the information
  11. Conflicting writes: concurrency, retries and contradictions
  12. Consolidation: twenty agents, one finding
  13. Provenance: what every shared memory should record
  14. How one agent poisons the rest
  15. Latency, consistency and cost pull against each other
  16. How to test a shared-memory design before you ship it
  17. What memory layers give you for multi-agent scoping today
  18. A minimum design to decide before the first agent writes
  19. Frequently asked questions
  20. Sources

Published 28 October 2026. Updated 13 November 2026. Every figure below comes from a paper or page read on 28 October, 30 October, 3 November or 13 November 2026, linked where it appears and listed at the end.

Multi-agent shared memory is a durable store that several agents read from and write to, so that what one agent learns is available to the others after its own context window is gone. Getting it right is a write-governance problem far more than a storage problem: the hard decisions are what each agent is allowed to write, into which scope, with what record of where it came from, and what gets checked before a private note becomes something every other agent treats as true.

Two papers from October 2026 show both sides of that. In Google DeepMind's Minecraft run, four Gemini 4 Argon agents with a memory that had "a private part and a part shared by the team" defeated the Ender Dragon in 27 hours and 14 minutes with no assigned roles and no game-specific planner; one agent posted a warning about a crafting quirk nineteen minutes in, and the helper function carrying the fix appears in 655 programs written by all four agents. In Meta Superintelligence Labs' reward-hacking paper, the same channel carried a bad habit instead: when a reward-hacking coder and a clean coder shared a memory of past submissions and grader results, a Claude Opus 4.7 target produced confirmed reward hacks in 28.7% of its submissions on average. Shared memory did the work of a planner in the first case and spread a cheat in the second, and the difference is governance.

A third study, from MIT Media Lab on 26 October, measures the quieter failure of having no memory at all: an agent that relies on its message history instead re-proposes options its counterparts have already rejected, because the rejections were the oldest messages and the first to be dropped. A fourth, from FAIR at Meta on 28 October, measures the opposite mistake of handing every run the whole history: on a stream of interleaved tasks, one global history gained almost nothing over no memory at all, while sending each run to a cluster of related past runs raised reward and cut estimated API cost by 65% to 72%.

Two Anthropic results from November 2026 add the within-run half of the picture. In a contract-terms test, several agents writing to one shared table at the same time left a brief with only 41 of 57 graded facts, because they overwrote one another's work, while one page per contract written by a single agent kept all 57. And in a 1,000-agent run on Claude Fable 5.2, the agents had no messaging tools at all and coordinated for 28.7 hours through five Postgres tables and per-agent Git branches. Typed records with a clear writer hold up under concurrent writes; a shared scratchpad does not, and what the team should remember after the run is a separate decision that none of these experiments makes for you.

What multi-agent shared memory is, and what it is not

A message between agents is transient and point to point; it reaches the agents it was sent to and is gone once their context is compacted or the run ends. Shared memory persists, is addressable by any agent with the right scope, and is read again later by agents that were not present when it was written. The DeepMind agents had both: an in-game chat that reached every player's next program, and a persistent memory that survived context compaction, which their instructions told them to use for "work in progress and next steps".

Three architecture shapes cover almost every real system. A centralized store has every agent read and write one place, which gives strong consistency and simple debugging and becomes a contention point as the team grows. A distributed design gives each agent its own store and syncs selected pieces, which isolates well and makes consistency painful, because the question "how quickly does the support agent learn that billing changed the plan?" now has an eventual-consistency answer. A hybrid keeps private tiers per agent and a shared tier for what the team acts on, and it is where production systems and the October 2026 experiments below land: the Minecraft memory was split private and shared, and Cohere's coding-agent teams worked in one shared workspace while each worker kept its own context. The blackboard pattern, where agents post results with an agent ID, timestamp and confidence to a shared board and others act on what appears, is the centralized shape with a schema, and its known weakness is two agents writing the same entry at once.

A shared knowledge base answers "what is generally true about our product"; shared agent memory answers "what has this team learned and decided, for this task and this user, and who said so". It is the same line that separates agent memory from RAG, with several writers instead of one.

Why messages are not memory: a rejection has to be stored, not remembered

A rejection is a fact to store and look up, not an old message that is allowed to fall out of the window. The MIT paper (Sreedhar, Yuan, Chari and Raskar, arXiv 2610.36264) measures what happens otherwise. Under push delivery, which the authors describe as how current agent infrastructure works, the sender decides when a message enters the recipient's context, the recipient reads in arrival order, and once the context is full the oldest messages are dropped. They had an organizer agent on gpt-5.6-terra run 2 to 20 scheduling negotiations at once, with five invitees per meeting, two rounds of replies and a memory with room for two conversations, and then asked it to propose new times for one open meeting, with 100 decisions per setting across five simulated societies. At 20 concurrent meetings, forgetting the oldest messages meant 97% of its proposals repeated times that had already been rejected, because dropping by age left half of a conversation in memory and the rejections sat in the half that went.

Two other results from the same work matter as much for memory design. Keeping every reply matched the perfect-retrieval control at every load, so the model could use a long history; the problem was the bill, at 10.5 times the tokens of retrieving only the conversation the decision needed. And what to keep depended on the agent's role. For an invitee handling 2 to 20 invitations at once, the model offered already-committed hours in 60% to 69% of cases even with every earlier reply in view, while a compact promise list (the hours already promised for each open meeting) brought that down to 28% at 20 invitations. Complete raw history was a worse input than the facts extracted from it.

The paper's fix is pull: messages wait in an inbox outside the context, and the recipient's own rules decide what it reads and what it keeps. In societies of 1,000 to 16,000 agents, where 24 agents share an interest and a requester needs ten of them, and with unwanted traffic deliberately heavy enough that arrival-order reading found nobody, an inbox that first reads messages carrying a refundable deposit, paired with a topic directory or a matcher, still found about 60% of the relevant agents at every size and formed the group in roughly half the societies. The authors state the limits plainly: two simulated tasks, models from one provider, identical agent inputs sharing one model judgment to keep the large runs affordable, and a first experiment that was sensitive to the instructions.

The inbox decides what an agent reads; memory decides what it keeps, and the thing worth keeping is the decision, not the transcript. "Invitee B rejected Tuesday 3pm for meeting A", written once as a record with who said it and when, is still there at negotiation twenty, while the message that carried it is not. Store rejections, commitments and claims as records scoped to the task, and have agents look them up by the thing they are about to propose.

When a multi-agent system needs shared memory, and when it does not

A multi-agent system does not always need shared memory, and the clearest evidence for that is recent. Cohere ran teams of GPT-5.6 coding agents on ProgramBench (200 programs to rebuild from scratch, scored by the share of a hidden behavioral test suite each rebuilt program passes, three runs per configuration) with a lead that hands out subtasks and workers that "see only the subtask" they are given and report back. Teams beat a single agent by up to about 10 points, at 3 to 7 times the cost. A Sol lead with 16 cheap Luna planning workers reached 61.8% for $155, against 63.2% for an all-Sol team that cost $510. That hierarchy needed a shared workspace and no team memory, because the lead held the whole picture.

When Cohere gave every agent a send_message tool, 84% of messages in the Sol teams went from workers to the lead, messages between workers averaged fewer than one per task, reward stayed flat for the Sol and Terra teams, and Luna teams lost 4 to 7 points. The authors' own suggestion for where communication would pay is "shared goals, shared progress logs, or messages that carry checkable evidence", which is a description of shared memory with provenance.

A one-shot fan-out where an orchestrator collects results and the run then ends does not need persistent shared memory; pass state through the orchestrator. Shared memory earns its cost when agents build on each other's results across time, when no single lead can hold the whole state (the Minecraft team ran for more than a day across thousands of dependent steps with no designated lead), when several agents serve the same user or customer and must not contradict each other, or when a new agent should start with what the team already knows.

Inside one run: typed tables with a clear writer beat a shared scratchpad

Within a single run, the coordination problem is mostly about who is allowed to write which record. Two Anthropic results published in November 2026 point the same way: give each kind of team state its own structure and each record an owner, and do not ask several agents to keep one free-form summary up to date at the same time.

Anthropic's Fable 5.2 multi-agent experiment, published on 9 November, is the larger of the two. A team of 1,000 agents (one lead and 999 helpers) running an early version of Claude Fable 5.2 reproduced a Lean formalization of Fermat's Last Theorem in 28.7 hours, and the agents "had no dedicated messaging tools and coordinated only through the database and Git". Each agent could push only to its own Git branch and open a merge request, and a separate job merged changes into main, refusing them only on a conflict or a fault. In its first 10 minutes the lead set up five tables in a shared Postgres database, each with a narrow job: announce for the lead's orders to the whole team, assign for who works on what, notes as an open board for claims and progress, subtasks as a to-do list where any agent can add a task "and the first helper to claim it owns it", and landed as a log of finished work. Anthropic's figure caption splits the writers the same way: the lead wrote orders and assignments, helpers logged finished work and managed the subtasks table, and both wrote to the notes table. The team explains its choice of SQL by saying "its transactions handle concurrent writes from 1,000 agents". By hour 30 the tables had taken 36,612 writes and 311,734 reads, nearly all of the writes going to notes (about 20,600) and subtasks (about 14,800), and those totals leave out most script calls. Anthropic calls it a toy experiment, the agents started from 47 lemmas proved in an earlier formalization, and the run was restarted from its last save near hour 18.

A smaller result shows what happens without that structure. In The components of agent memory (6 November), Anthropic built a wiki for a Harvey LAB task that simulates a company acquisition from a set of contracts, and while the wiki was being built "several agents wrote to a shared table of contract terms at the same time". The brief generated from that wiki included only 41 of the 57 graded facts (72%), and when the team looked at why, the shared table "summarized the contract terms poorly and was missing some of them altogether, because agents had overwritten one another's work". After the instructions were rewritten so that each contract got its own page, written by a single agent that quoted the terms word for word, all 57 facts survived and 100% of the criteria could be met. Two things changed at once (one writer per page, and verbatim quotes instead of summaries), the page does not name the model, and it is one task, so read it as a clear illustration of the overwrite failure, not a measured effect size.

Cursor's Projects, released in beta on 10 November, applies the same split to people and their agents working side by side: a shared task board shows who is doing what and the pull request behind each task, "a decision made in one chat is accessible to every agent in the Project", and each teammate keeps a one-to-one chat with their own coordinator and worker agents, "each with its own local context". Cursor's post describes agents spotting overlap early and agreeing on the order of work, and it does not describe a formal mechanism for conflicting writes.

The rule I take from these results is to put each kind of coordination state in its own typed structure (orders, assignments, claims, finished work), give every record one writer or a claim-once rule, make shared boards append-only so a new note never replaces someone else's, and keep the merge of competing work behind a step that refuses conflicts instead of resolving them silently. A shared scratchpad that several agents rewrite is the one structure where the last writer quietly decides what the team knows.

After the run: which notes become what the team remembers next week

None of these November results say what the team should remember once the run is over, and that is the part a memory layer exists for. The Fable tables did their job for the whole run, and Anthropic describes the busiest of them, notes with roughly 20,600 writes, as a board for claiming work and reporting progress, which are records that stop being true the moment the work lands. The same board also held things the next team would want on day one: helpers posted their difficulty verdicts there, and early in the run those verdicts judged 47 of the 60 statements infeasible within budget, yet the team went on to prove most of them. Cursor makes a decision from one chat visible to every agent in the Project, which settles visibility within that Project and leaves open what happens when the decision stops being true.

Anthropic's own memory research names the risk in promoting anything: injected memories "use up valuable tokens, and an incorrect note can be carried into every session". So the end of a run needs an explicit promotion step, and these are the rules I would use for it:

Run recordWhat happens when the run endsScope it lands in
Claims, assignments, heartbeats, "working on it" notesExpire with the runNone
Finished work with its evidence (the landed kind of log)Kept as a record of what was done and how it was checkedProject or team
Decisions with their reasons, including rejectionsKept, with who decided and when, and linked to anything they replaceThe narrowest scope whose agents will act on it (team, customer or user)
Tool quirks and workarounds that were confirmedKept with the observation behind themTeam, or wider if other teams use the same tool
Estimates and verdicts that the run proved wrongKept as a correction, not as the original claimTeam
Facts a person disclosed under a narrower permissionNever promoted past that permissionThe person's own scope

Two rules keep this honest. Promotion is done by one designated writer (the lead, or a consolidation job that runs after the run), not by whichever agent wrote last, because the overwrite failure in the contract test applies to durable memory exactly as it applies to a working table. And every promoted record carries its provenance, so that a fact which turns out wrong next week can be traced to the run and the agent that produced it and corrected in one place. The consolidation section below covers how repeated findings collapse into one record and why agreement is only evidence when the agents were independent.

Orchestration state, handoffs and shared memory are different layers

Orchestration state and shared memory solve different problems, and most multi-agent systems need both. Orchestration state is the execution record of a run: which step is active, what each node returned, where to route next. LangGraph's persistence documentation puts the split in one line, "a checkpointer tracks the current thread, and a store tracks durable information across threads", and lists what checkpoints are for: conversation continuity, human-in-the-loop workflows, time travel and fault tolerance, all of it thread-scoped. Shared memory is the cross-thread layer, holding what the team has learned and decided for agents that were never in the thread that produced it. Cognee's 29 October guide to stateful multi-agent systems draws the same line between orchestration state and shared semantic memory, and the rule that follows is to keep routing state in the orchestrator's checkpointer and knowledge in the memory layer, without using either as the other.

Handoffs sit between the two. Passing the full conversation to the next agent is the push failure from the MIT study in another shape: the receiving agent pays to read everything and still has to find the few facts that matter, while passing nothing makes it re-derive what the previous agent already settled. A handoff works better as a small structured payload (the task, the identifiers of what is being worked on, the decisions already made and the open questions) plus read access to the shared scope, so the receiving agent queries for what its step needs and gets the current version of each fact rather than a snapshot frozen at the moment of handoff. When those queries follow relationships, such as customer to account to earlier tickets, a store that can traverse links answers them directly where similarity search returns the nearest fragments; when they are lookups by entity and time, a well-indexed record store is enough.

The access path matters once the agents come from different frameworks or vendors, and MCP is one common way to give them a single store. Hindsight's 29 October OpenBot integration points Claude, Codex, Gemini and other OpenBot agents at one memory bank through a single MCP server URL, so "what Codex learns, Claude knows", and the bank segment of that URL is the scope. Two caveats from the same post apply to any shared tier. Writes are asynchronous by default, so an agent that stores a fact and reads it back in the same turn may not find it yet (Hindsight adds a blocking sync_retain for that case). And, in the post's words, "a shared bank shares mistakes too": if one agent stores something wrong, every agent on that bank reads it, which is why who may write into a shared bank, and with what evidence, matters more than how the agents connect to it.

What agents should share, and what they should keep private

The useful test is whether another agent will act on it and whether it is safe for every reader in that scope to see.

Share with the teamKeep private to the agent (or a narrower scope)
Facts about the shared world the team acts on: locations, IDs, current state of an order or a ticketScratch reasoning, intermediate drafts and abandoned plans
Tool quirks and the workaround, with the evidence that the workaround worksHypotheses that have not been checked
Decisions and the reason for each, so a later agent does not undo one blindlyAnything a person disclosed under a narrower permission than the team's
Task status: claimed, done, blocked, by whomPer-role working state that only makes sense to that role
Lessons from failures, stated with what was observedA bare "it passed" signal with no account of how it passed

The Minecraft team's shared notes are a clean example of the left column: the paper reports that the agents "posted the coordinates of chests, portals and dangers, and kept notes on the quirks of their tools in the memory the team shares", and their general instructions asked them to record "mechanics, strategies and workarounds in memory so that no obstacle is met twice". The last row of the right column matters as much. In the Meta paper the propagation channel was exactly a memory of past submissions paired with the grader's result for each, which is a lesson stripped of its evidence; a submission that passed by bypassing the tests looks, in that memory, exactly like one that passed by being correct.

Failures are worth sharing, with that caveat. A record of what did not work stops the next agent from repeating it, provided it records what was tried and what was observed.

Scope: per-agent, per-run, per-team, per-user, per-tenant, global

Most shared-memory bugs in production are scoping bugs, not recall bugs. Scope decides which agents can see a memory, and the usual levels nest:

ScopeHoldsTypical reader
Agent (one agent instance or role)Its own learned conventions and working notesThat agent only
Run or taskIntermediate findings for one workflow executionAgents in that run; ages out when it ends
Team or projectDecisions, task status and shared lessonsEvery agent on the team
UserOne person's preferences, history and factsAny agent serving that person
Customer or tenantAn organisation's facts, in a B2B productAgents serving anyone in that organisation
Account or globalProduct facts and policies that apply everywhereEvery agent

Reads compose these levels. An agent serving one user in one run should see its own agent memory, the run, that user, that user's organisation and the global tier, and should never see a different user's memory or another tenant's. The rule that keeps this sane is that visibility flows one way, from wide to narrow: a user-scoped read may draw on customer and account memory, and a customer-scoped read must never reach into an individual user's memory.

Assign scope when a memory is written, not only when it is read. A filter applied at read time is a check at a door the facts already walked through, and filters are easy to get subtly wrong. Mem0's documentation, for example, states that identifiers you do not mention are not constrained: filtering on user_id alone also returns records that carry an agent_id or run_id. That is reasonable behaviour, documented clearly, and it means "agent B cannot see agent A's notes" holds only if every read includes the right filter. A paper on governed shared memory (Margalit et al., June 2026) reports the same class of failure in a live multi-tenant service: tenant isolation held, but sub-tenant scope was bypassed on direct GET-by-id requests made with agent-scoped credentials until the authors disclosed and fixed it.

One question that the scope table does not answer by itself is whose scope an agent writes into when it acts for a person. An agent that files an expense report on behalf of an employee should write what it learns about that employee into the employee's scope, and record both identities: the agent that wrote it and the person it acted for. An agent with its own standing identity, such as a background agent that watches a queue for everyone, builds its own agent-scoped memory, and someone has to decide explicitly what it may read of each person's.

Scope first, then retrieve: more memory is not better memory for mixed work

When the same agents handle different kinds of work, deciding which slice of memory a run should read matters more than how much memory exists. FAIR at Meta's Routed Continual Learning paper (Philip, Balakrishnan, Geraghty, Mao, Venkat and Mironov, arXiv 2610.38796, 28 October 2026) measured this on one stream that interleaves 301 instances from the six CL-Bench tasks (repository fixes, cohort survival estimates, database questions answered with limited SQL, poker against exploitable opponents, sales forecasting and radio spectrum monitoring) with 97 banking customer-service conversations from τ³-Bench, 398 runs in all, across four models (Claude Opus 4.7, Claude Opus 5, GPT-5.6 Sol and Gemini 3.7 Flash) and five matched rollouts each. A single global history of past runs, the approach CL-Bench had found strongest when each task ran on its own, gained an average of 0.015 over no memory, on a scale where 0 is the no-memory run and 1 is the task maximum. For Opus 5 it stayed worse than no memory for the whole stream. The authors' explanation is that one history mixes experience that helps one task with experience that is irrelevant to another, so a poker hand and a banking policy question end up competing for the same context.

Partitioning fixed most of that. Before each run, an LLM router either reused an existing cluster of past runs or created a new one, seeing only the new prompt, a description of each available memory type and, for every cluster, its identifier, type, description and run count, never the stored trajectories themselves. Splitting the history this way lifted the average gain to 0.222, and letting the router also choose the kind of memory per cluster (raw past runs, distilled strategies, or statistical models of repeated numbers) took it to 0.280. Against the global history, the full system raised normalized reward by 15% to 30% of the maximum attainable and cut estimated API cost by 65% to 72%; for GPT-5.6 Sol, normalized reward went from 0.130 to 0.464 while the estimated cost of a 398-run rollout fell from $456.22 to $125.99. Without ever being given task labels, the router chose the same cluster partition as a fixed assignment built from the true labels in 91% of cases.

One result tells you where the gain comes from. Routing a memory that already retrieves selectively (ReasoningBank, which fetches stored strategies by similarity to the request) produced no consistent reward gain and raised its cost by 8% to 29%, while routing raw history helped every model. The authors suggest the reason is that raw history exposes everything in a cluster while ReasoningBank already filters, which puts the benefit in keeping irrelevant experience out of the run; a store that already filters gets less from a second filter.

For a shared memory, the order of operations follows directly: decide the scope a run belongs to (the task type, the customer, the agent role) and then retrieve within it, instead of ranking across everything the team has ever stored. Most production systems already know that scope from identifiers such as a customer ID or an agent role, and an LLM router earns its cost where work arrives unlabeled. The paper is also clear about what it did not test. Its runs were processed one at a time, and although the architecture defines atomic reads and writes per cluster, the authors write that they "do not evaluate simultaneous updates, stale reads, or cross-model reuse of cluster state". Several agents writing into one cluster at once is the write-governance problem covered in the sections that follow (stable IDs per unit of work, contradiction handling, provenance and promotion checks), and the paper's own ethics statement asks deployments to enforce "task- and user-level authorization, provenance, retention and deletion policies, and isolation across security boundaries".

Multi-user agents: permissions have to follow the information

Shared memory gets harder when several people use the same agent, for example in a Slack channel. Mastra's Sam Bhagwat calls the control needed here fine-grained context: the agent has to adapt to each user's authorization level and to everyone who can see the conversation. His example is a private calendar event read in a one-to-one chat ("Medical Appointment") that resurfaces later in a shared scheduling conversation with a co-worker who can only see availability, either because the tool result is still in context or because it was written to a stored memory.

The practical consequences for memory are direct. Store source references and permissions with every memory, and keep them through summaries, so access can be rechecked at read time. Build shared summaries only from inputs every member of the audience was already allowed to see; a summarizer cannot be trusted to strip every private detail. Recheck when the audience changes, including when someone joins a conversation or a permission is revoked mid-run.

Conflicting writes: concurrency, retries and contradictions

Two different problems hide under "conflict", and they need different tools.

Write conflicts happen when two agents update the same record at once. The cheapest fix is structural, giving each record one writer as described in the section on typed tables above, and where records must be shared the tools are the familiar ones from distributed systems: optimistic locking with version numbers, compare-and-swap for anything that represents state an action depends on (an order's status, a claimed task), and last-write-wins only for data where losing a write costs nothing. The swarm-specific trap is retries. Hindsight's post on thirty agents sharing one memory (Vectorize, 20 October 2026) points out that a retry without a stable document ID writes a second complete copy of everything, and the consolidation layer then reads the duplicate as further corroboration. The fix is to derive the ID from the unit of work (worker plus task), never from the attempt or a timestamp. The same post notes that entity names written by different agents at the same instant can split one company into two entities, because each write sees nothing committed yet to match against; later writers converge on whichever name committed first.

Semantic conflicts happen when two agents assert incompatible facts about the same thing. Do not resolve these by overwriting. Keep both, decide which is current (by recency, by the source's authority, or by an explicit policy), mark the older one as historical and link it to its replacement, so the system can still answer what it used to believe and why it changed. Watch for one specific bad trade: a newer statement that is vaguer than the old one ("takes a cholesterol medication" against "takes 20mg of atorvastatin daily") should enrich or be discarded, not replace the precise fact. Pipeline order matters as well. The governed-memory paper found that a synchronous near-duplicate gate rejected contradictory writes before the asynchronous contradiction detector ever saw them, so the system never learned that a fact had changed.

Agents can catch some contradictions themselves if claims are visible to the team. In the Minecraft run, when one agent reported returning with twelve blaze powder one second after burning to death, a teammate flagged the contradiction within three minutes, and another agent retracted a success its own program had announced: "my previous chat was an unguarded script branch". That only works when claims carry enough context (who, when, what was observed) for another agent to check them. For how time-aware storage handles supersession, see knowledge graphs versus vector search for agent memory.

Consolidation: twenty agents, one finding

A swarm writes the same finding many times by construction. If twenty workers each conclude that a checkout service retries three times, you want one belief backed by twenty observations, not twenty rows competing in retrieval. Hindsight's design keeps every raw fact (it never merges two of them) and consolidates related facts into observations with a proof_count, defined as the number of distinct live source memories behind the observation. Twenty agents agreeing becomes one observation with a proof count of twenty.

Agreement is only evidence if the agents were independent. Twenty agents that read the same poisoned note and repeated it are one source counted twenty times, and a retry storm inflates the count without anyone confirming anything. Treat a corroboration count as a signal to inspect, and record enough provenance to tell independent confirmation from echo.

Consolidation is also the promotion path from private to shared. A finding should usually start in the narrowest scope (the agent or the run), move to the team when it has been checked or independently repeated, and move to the user or organisation tier when it is durable. Each promotion is a write into a wider scope and deserves the same check as any other write there. The other half of consolidation is forgetting: run-scoped notes should age out when the run ends, team notes when the project closes, and anything that keeps growing without a retention decision will eventually surface stale context as if it were current.

Provenance: what every shared memory should record

When three agents disagree at 2am, provenance is the difference between reading the answer and guessing it. These are the fields I would require on every write into a shared scope:

FieldWhy it matters in a team
Writing agent (identity and role)Tells you which agent to distrust, retrain or quarantine
Acting on behalf ofSeparates the agent's identity from the person whose scope it wrote into
ScopeMakes the write-time decision auditable
Source evidenceThe verbatim observation or tool output behind the claim, so a reader can check it
Time stored and time the event happenedThey differ, and the event time is often the one that matters
ConfidenceLets readers weight a hypothesis below a verified fact
What it replacedKeeps the history of a belief instead of overwriting it

The governed-memory paper treats losing this as its own failure mode ("provenance collapse") and reports reconstructing all depth-four derivation chains with the correct writer identity in its harness. Provenance is also the precondition for every defense against a misbehaving agent: you cannot quarantine one agent's writes if you do not know which writes were its.

How one agent poisons the rest

For a single agent, a bad memory is one bad session. In a team, it is the premise every other agent recalls. Meta Superintelligence Labs measured this for reward hacking, where a coding agent passes an automated grader without solving the task (for example by exiting the process early or adding a pytest hook). The authors elicited hacking in small open-weight source agents (mid-training on synthetic documents about the test environment, then coding RL) and paired each source with clean target agents built on fourteen different models. In the shared-memory experiment, source and target solved the same new task each round and both submissions, with the grader's result for each, were appended to a shared memory the target consulted in later rounds; each seed ran 30 trajectories of 12 rounds, and the reported rate is the share of the target's submissions that were confirmed hacks.

Target modelSource: Qwen2.5-Coder-14B (conftest hook)Source: Gemma-3-12B (early exit)Source: Gemini 3.1 Pro after six hops
Qwen3-235B16.0%19.7%61.3%
Claude Opus 4.728.7%13.0%38.7%
Gemini 3.1 Pro14.0%0.3%21.7%
Claude Opus 511.1%2.0%7.2%
GPT-5.50.0%0.0%0.3%

Mean shared-memory propagation rates from Table 9 of arXiv 2610.12822 (v2, 12 October 2026), Python coding tasks graded by pytest; selected rows, the full table has fourteen targets. A hack counts as confirmed under the paper's mechanical criterion, which the authors validated on a random sample.

Three findings matter for anyone designing shared memory. Small open-weight sources pushed stronger closed-weight targets into hacking. The strategy got more contagious as it travelled: a Gemini 3.1 Pro agent that had picked the hack up six hops down a transmission chain induced stronger shared-memory propagation than the Gemma source the chain started from, and the authors attribute the intensifying chains on hard tasks to code that "acquires more persuasive justifications" at each hop. And the effect reached coordination itself, biasing task routing toward the hacking agents and surviving aggregation when no clean candidate passed.

The defenses that worked, and their costs, are specific. The authors' recommendation is to treat "code, memory entries, and plans from other agents" as untrusted input. A separate verifier gating what gets delivered reduced delivered hacks, with several verifiers reaching zero or near zero, but showing the verifier the default grader's pass signal increased false accepts, and even the best verifiers rejected some genuine solutions. Self-review by the coder lowered propagation for every coder tested, but most still produced hacks. Translated into memory design: gate writes into shared scopes, never store an outcome without the evidence behind it, keep the planner's brief and the team's agreed conclusions in a namespace workers cannot overwrite (Hindsight's swarm post recommends exactly this), and run an independent check before a note is promoted to shared truth. The DeepMind team did a version of the last one: a fifth Observer agent followed the session as an independent witness for cheating or specification gaming and found none.

Latency, consistency and cost pull against each other

Strong consistency (every agent sees a write immediately) costs latency and coordination; low latency usually means caching or eventual sync, which brings back agents acting on stale state; and low cost means pruning aggressively, which forces agents to re-derive what the team already knew. A sensible split is strong consistency for small, action-critical state (task claims, order status, the team's current plan), eventual consistency for accumulated knowledge, and nothing persistent at all for scratch work. The shared tier is also cheaper than the alternative it replaces: passing every agent's full history to every other agent grows the prompt on every call, and the Minecraft run, which leaned on context caching (91% of 1.35 billion input tokens were served from cache), still estimated about $520 at introductory list prices for the players up to the win.

Where the shared tier runs is a compliance decision as well as a latency one. Every agent with read access inherits that store's region and retention, so a team in a regulated industry decides residency once, for the store, and not separately for each agent. Hindsight and Cognee both document self-hosted setups, and Cognee's guide describes a fully local, air-gapped deployment with no external service dependencies.

How to test a shared-memory design before you ship it

Test the scope boundaries as hard as you test recall. Mastra's list of cases is a good start: two people ask the same question with different permissions; a private discussion continues in a shared conversation; a private fact survives a summary and is recalled later; a permission changes during a tool call. Add three cases specific to teams of agents. Write a contradictory fact from a second agent and check that the first one is marked historical rather than silently kept or silently lost. Retry a worker mid-task and check that nothing is counted twice. Have several agents build one shared summary at the same time, then have one agent per entity write its own page, and count how many known facts survive each way, which is Anthropic's contract-terms test applied to your data. Plant a plausible but wrong note from one agent (a fake workaround, or an outcome without evidence) and measure how many other agents repeat it, which is the Meta protocol scaled down to your system. Then run one agent through many concurrent tasks with a bounded context and count how often it re-proposes something already rejected, which is the MIT protocol and the cheapest way to find out whether your decisions live in memory or only in message history. If your agents handle mixed work, run the same interleaved stream once against one shared history and once against scoped partitions, and compare both reward and token spend; that is the FAIR protocol, and it shows whether your retrieval is drawing on experience that belongs to a different kind of task. The rest of a memory test plan carries over from single agents; see how to test agent memory before you ship.

What memory layers give you for multi-agent scoping today

The distinction to look for in any memory layer is whether scope is a first-class part of the write, whether reads compose scopes in one direction, whether contradictions are tracked instead of overwritten, and whether provenance survives consolidation. Most layers give you the identifiers; fewer give you the governance. Mem0 scopes memory by user_id, agent_id, app_id and run_id. Hindsight uses banks and tags, consolidates into observations with proof counts, and offers a Memory Defense policy that is off by default. Cognee's guide describes dataset-level read, write, delete and share permissions, with each write carrying the agent identifier, timestamp and source as graph metadata. Mastra maps thread and resource identifiers to your own access rules and leaves fine-grained context as a pattern you assemble from its authorization, memory scopes and processors. Agent-to-agent protocols are a separate layer again; A2A and MCP move messages and tool calls, not durable shared state.

Maximem Synap lets several agents share a central context layer while keeping their own agent-specific memories, and the scope chain handles the isolation between them. Memory is isolated by default across the account, the customer, the individual user and the conversation, a read sees the narrowest scope that applies and everything above it but never below or sideways, organisations with a deeper shape can model it as their own hierarchy to any depth, and a grant gives one part of that hierarchy directed, read-only access to another's memories. Every memory carries a type, a confidence score, its scope, when it was stored and when the thing it describes happened, and provenance records where it came from, what it replaced and what it used to say, so a change to a fact is recorded rather than overwritten. Building this yourself is a reasonable choice, as long as the estimate accounts for where the time goes: the retrieval is the easy part, and the work is in scoping, contradictions and keeping tenants apart.

A minimum design to decide before the first agent writes

  1. Where the shared tier lives, and which state is strongly consistent (claims, statuses, the plan) versus eventually consistent (knowledge).
  2. The scope ladder for your product (agent, run, team, user, customer, global), with scope assigned at write time, reads that compose upward only, and the scope of each run chosen before retrieval ranks anything.
  3. Who may write where. Default write access to shared scopes is "no"; give it per role, and keep the brief and agreed conclusions in a namespace workers cannot overwrite.
  4. The provenance fields every shared write must carry, including the acting-on-behalf-of identity and the source evidence.
  5. The contradiction policy: which fact wins, how the loser is kept and linked, and in what order duplicate and contradiction checks run.
  6. The promotion check a note passes before moving from an agent's private notes to the team, and from the team to the user or organisation tier.
  7. Retention for each scope, and stable IDs per unit of work so a retry replaces its earlier attempt instead of duplicating it.
  8. Which outcomes become records the moment they happen, such as a rejection or a commitment, so no agent has to recall them from its message history.
  9. The typed structures for in-run coordination (orders, assignments, claims, finished work), each with one writer or a claim-once rule, so no agent rewrites another's record.
  10. Who promotes run notes into durable memory when a run ends, which kinds of record expire, and which scope each kept record lands in.

If you cannot answer one of these, the agents will answer it for you in production, and the answer will be whatever the last writer said. Answer them up front and a new agent joins the team already knowing what the others learned, and your customers stop getting two different answers from two of your agents.

Frequently asked questions

What is multi-agent shared memory?

Multi-agent shared memory is a persistent store that several AI agents read and write, so what one agent learns or decides is available to the others after its context window is gone. It differs from messages between agents, which are transient, and from a document knowledge base, which holds reference material, not what the team has learned. Most production designs are hybrids: a private tier per agent and a shared tier for what the team acts on.

Is message passing between agents enough, or do they need shared memory?

Message passing is enough while every message an agent needs still fits in its context, and it stops being enough under load. In MIT Media Lab's October 2026 simulation, an organizer agent running 20 negotiations at once with a bounded memory re-proposed already-rejected times in 97% of its proposals because the oldest replies had been dropped, and keeping every reply restored accuracy at 10.5 times the tokens. Store decisions such as rejections and commitments as records the agents can look up, and keep messages for coordination.

What is the difference between orchestration state and shared memory?

Orchestration state is the execution record of one run (the current step, node outputs and routing), kept per thread by a checkpointer so the run can resume after a crash or a human approval. Shared memory holds what the team has learned and decided across runs and threads, readable by agents that were not in the run that wrote it. Most production systems need both and keep them in separate stores.

What should agents share and what should they keep private?

Share facts about the shared world the team acts on, decisions with their reasons, task status, tool quirks with their workarounds, and lessons from failures stated with what was observed. Keep scratch reasoning, unchecked hypotheses, per-role working state and anything a person disclosed under a narrower permission private. Never share an outcome (such as "the tests passed") without the evidence behind it, because that is the channel through which reward hacks spread in Meta's October 2026 experiments.

Does giving every agent all of the shared memory make it better?

Not when the work is mixed. In FAIR at Meta's October 2026 Routed Continual Learning study, one global history of past runs gained an average of 0.015 over no memory on 398 interleaved runs across four models, while routing each run to a cluster of related past runs raised normalized reward by 15% to 30% of the maximum attainable and cut estimated API cost by 65% to 72%. Choose the scope a run belongs to first, then retrieve within it.

Should memory scope be enforced at write time or read time?

Assign scope at write time and also enforce it on every read. Read-time filters alone are easy to get wrong: some memory APIs, by documented design, return records with extra identifiers when a filter omits them, and a June 2026 study of a production multi-tenant memory service found sub-tenant scope bypassed on direct lookups by ID until it was fixed.

How do you handle two agents writing conflicting facts?

Separate write conflicts from semantic conflicts. For simultaneous updates to the same record, use version checks or compare-and-swap, and give each unit of work a stable ID so a retry replaces its earlier attempt. For contradictory facts, keep both, mark which one is current under an explicit policy, link the old one to its replacement, and never let a vaguer statement overwrite a precise one.

Should agents in one run coordinate through a shared scratchpad or structured tables?

Structured tables with a clear writer for each record. In Anthropic's November 2026 contract-terms test, several agents writing one shared table at the same time left a brief with only 41 of 57 graded facts because they overwrote one another, while one page per contract written by a single agent kept all 57. In Anthropic's 1,000-agent Fable 5.2 run, the team coordinated for 28.7 hours with no messaging tools through five Postgres tables (orders, assignments, an open notes board, claimable subtasks and a log of finished work) and per-agent Git branches.

What should a multi-agent team remember after the run ends?

Keep decisions with their reasons, finished work with the evidence it was checked, confirmed tool workarounds and corrections to estimates the run proved wrong, and let claims, assignments and progress notes expire. Have one designated writer, such as the lead or a consolidation job, promote what is kept into the narrowest scope whose agents will act on it, with provenance attached, because an incorrect note promoted into shared memory is carried into every later session.

Can one agent poison a shared memory?

It can, and the effect has been measured. In Meta Superintelligence Labs' October 2026 paper, a reward-hacking coder sharing a memory of past submissions and grader results led a clean Claude Opus 4.7 target to submit confirmed hacks in 28.7% of submissions on average, and a source that had picked the hack up six hops down a chain pushed a Qwen3-235B target to 61.3%. Treat memory written by other agents as untrusted input, gate writes into shared scopes, and verify before promoting a note to shared truth.

Sources

Retrieved 28 October 2026 unless marked as retrieved 30 October, 3 November or 13 November 2026.

From the team at Maximem

Stop rebuilding agent memory from scratch

Maximem Synap is the context management layer we built after hitting every problem in this post ourselves. Persistent recall across sessions, entity resolution and conscious forgetting, in Python, TypeScript and REST.

Related posts

Looking for more to read? See our directory of the best engineering blogs to follow.