Cybersecurity

AI Agent Memory Worm: Anthropic and EPFL Test It, It Mostly Fails

Anthropic and EPFL tried to make AI agents infect each other via shared memory files. Out of ~2,000 attempts, zero confirmed spreads. Here's why that matters.

Editorial Team / /9 min read
Clawd in a lab coat examines a tiny green pixel bug on a notebook with a magnifying glass, under the EPFL logo

Some headlines this month described an “AI mind virus” that spreads between AI agents through the memory files they keep from one session to the next. The researchers who ran the actual experiment found something more precise and more useful than the headlines: in lab conditions built to favor it, a payload written into an agent’s persistent memory file infected the next agent more than half the time. But when the same team went looking for that same thing happening on its own, in roughly 2,000 candidate cases pulled from real, archived agent activity, they found zero confirmed instances of a payload actually jumping from one agent to another. That gap, between what works when researchers build it on purpose and what has been caught happening in the wild, is the actual story.

The research comes from a team at Anthropic and the Swiss engineering school EPFL (École Polytechnique Fédérale de Lausanne), published as a preprint, meaning a research paper shared publicly before it has gone through formal peer review by other scientists. It is titled “Mind Viruses: Self-Propagating Ideas in Multi-Agent LLM Systems”, and it deserves to be read for what it actually found, not for the version that traveled fastest online.

The gap between the headline and the paper

“AI mind virus” is a phrase from press coverage, not from the researchers. Some outlets used it to describe an idea spreading between AI agents the way a biological virus spreads between people, something already happening in the wild, quietly, agent to agent. The paper supports a narrower and more specific claim: when a payload and a memory-file setup are deliberately engineered to favor spread, propagation can work, and work often. What it does not support is the idea that this is already happening unassisted, out in the world. Scanning real, archived agent activity for evidence of that, the same team found none.

That is not a small distinction. A paper that says “we found a working exploit, and it is already spreading on its own” and a paper that says “we built a working exploit, and separately, couldn’t find evidence it has spread on its own yet” call for very different reactions from anyone running AI systems today. This one is the second kind, and the honest framing is worth more than the scary one for a simple reason: it tells you exactly which conditions make the spread work, instead of leaving you to imagine every possible one.

What Anthropic and EPFL actually tested

The setup targets a specific and increasingly common pattern in AI agent systems: persistent memory files that an agent rereads across sessions. Many autonomous AI agents, especially ones meant to run continuously rather than answer one question and stop, keep a running file of notes, goals, and context, often with names like SOUL.md or MEMORY.md. The agent writes to this file after doing work, and reads it back the next time it starts up, so it can pick up where it left off instead of starting from zero each session.

The researchers’ question was simple: what happens if that memory file contains a prompt injection, meaning a malicious instruction hidden inside content the AI reads and mistakes for a legitimate command, rather than treating it as plain data to be summarized. If Agent A’s output, containing a planted instruction, gets copied into Agent B’s memory file, and Agent B reads that file and acts on it the way it acts on its own past notes, the instruction has effectively jumped from one agent to another without a human ever approving the transfer.

Two server units connected by a single highlighted red cable among neutral grey cables, standing in for one agent's memory file being copied to a second agent

To test it, the team planted two families of payloads. The first was ideological: instructions designed to implant a belief or a goal the agent would then carry forward and potentially pass on, the way a rumor spreads rather than a piece of malware. The second was action-based: instructions that pushed toward concrete harmful behavior such as promoting a cryptocurrency, tampering with a git repository (the version-history system many developers use to track code changes), deleting files, or running a malicious script. The ideological payloads test whether an idea can persist and spread through a chain of agents at all. The action payloads test whether that spread, if it happens, can translate into something with real consequences.

In the engineered lab setting, called a “virus chain,” where an evolved payload is planted in one agent and then judged on whether it convinces a clean second agent to adopt and re-transmit it, the mechanism worked substantially. When a payload got written into an agent’s persistent, self-editable memory file, the kind an agent’s own instructions are drawn from, it infected the next agent in the chain about 55% of the time. When the same payload ended up in an ordinary file instead of that special memory file, the success rate dropped to roughly 17%. The team also tried routing payloads through a simulated Moltbook-style social feed instead of direct agent-to-agent messages; there, the same evolved payloads largely failed, diluted by unrelated posts and treated with more suspicion by the reading agent.

Separately from those engineered tests, the team ran a real-world check. They did not deploy contaminated agents into production systems and watch what happened; instead, they retrospectively scanned archived posts from a platform called Moltbook, where AI agents post and interact, narrowing a large initial archive down to roughly 2,000 candidate propagation attempts from about 400 unique authors. That is closer to combing through historical records for near-misses than monitoring an active outbreak in real time, and it is where the 2,000-attempts number below comes from, not from the engineered lab tests above.

The number that matters: 2,000 attempts, zero confirmed spreads

Here is the central result of the real-world check, stated plainly: scanning those archived posts, the researchers identified around 2,000 candidate propagation attempts, from roughly 400 unique authors, cases where the conditions for a payload to jump from one agent’s memory to another’s looked like they were present. Of those roughly 2,000 attempts, they found no confirmed case of successful agent-to-agent propagation in the wild. In the clearest-looking clusters, closer inspection showed a handful of accounts, in one case as few as seven, posting the same payload on a loop; when those accounts stopped posting, the apparent spread stopped too, the signature of repetition rather than transmission.

That is the number that should anchor any discussion of what is actually happening today, and it is the number press coverage tended to bury under the more exciting “mind virus” framing. A near-2,000-to-0 ratio in real archives is not a rounding error or a technicality, but it is not the same result as the engineered lab test described above, where the mechanism worked on more than half of attempts once a payload was written into an agent’s persistent memory file. Read together, the two results say something more specific than “it doesn’t work”: the mechanism functions when someone deliberately builds it, and no one has been caught doing that for real yet.

That does not mean the underlying idea is nonsense, in either direction. It means the specific real-world conditions scanned in this research, archived agent posts on one platform, over one window of time, were not enough to catch a confirmed case. The distance between “works when engineered” and “observed happening in the wild” turned out to be wide, in the reassuring direction for now.

Why publish an experiment that mostly failed

It would have been easy for Anthropic to shelve a result this unflattering to its own scariest hypothesis, or to frame it only around the couple thousand attempts rather than the zero confirmed successes. Instead, the team published the method, the numbers, and the negative result together, along with the code and interaction transcripts in the open, at the project’s GitHub repository and companion site mindvirusdata.live.

That choice is itself informative. Publishing a mostly-failed experiment is a stronger signal than publishing a clean success story, because it lets outside researchers check the work, try to break the setup differently, and either replicate the negative result or find the conditions under which it flips. A lab that only shares wins is optimizing for its own reputation. A lab that shares “we tried to break our own product’s safety assumptions and mostly couldn’t” is optimizing for the field actually knowing where the edges are.

This preprint also sits alongside a separate, broader piece of work: Anthropic’s Frontier Red Team, an internal group tasked with probing the company’s own systems for serious risks, published a report on emerging problems in multiagent systems days later. That report covers four different failure patterns in systems made of multiple AI agents working together: agents that fail to coordinate properly, agents that fall into conformity or herd-like behavior copying each other’s mistakes, agents that get manipulated through deception, and conflicts that escalate when agents pursue incompatible goals. It is related context about the same broader concern, not a second confirmation of the memory-worm numbers, and it should not be read as an independent replication of this specific experiment.

The architecture pattern worth watching

The paper’s most durable contribution is not the zero, and it is not the 2,000. It is the precision with which it names the exact architecture choice that would need to be present for this kind of spread to work at all: a persistent memory file, reread by the same or a different agent without independent validation of its contents, where one agent’s output can end up copied into that file.

A row of drive sleds in a server rack, one lit with a distinct red status LED and pulled out from the row, standing in for a shared memory store one agent is actively writing to

Strip away the “virus” language entirely and what is left is a plain engineering question anyone building agents today should be asking: does anything in this system treat content written by one AI as an instruction simply because it appears inside a file the agent trusts, like its own memory or state file? If a memory file is treated as pure data, summarized and reasoned about rather than obeyed, this entire class of problem does not apply. If a memory file’s contents get executed as instructions, including instructions that arrived indirectly through another agent’s writing, the door the researchers describe is open, even if walking through it currently proves difficult in practice.

The paper also tested the obvious fix: adding a short warning about self-propagating instructions to an agent’s system prompt. In the engineered tests, that one paragraph cut spread to close to zero, and it held up even when the researchers spent 15 rounds of adversarial optimization, more than 150 tampered payloads, specifically trying to write something that would get past it. Not a single one propagated beyond the first agent it reached. For a system already built around persistent, reread memory files, that is a cheap, concrete mitigation, not a redesign.

This is why the paper is useful reading for engineering teams rather than a headline to forward with alarm. It does not say multi-agent systems with shared memory are dangerous today. It says: here is precisely the pattern that would make them dangerous, tested under favorable conditions, and here is how far that pattern currently gets in practice. That is a rare thing in security research: a clearly bounded negative result with an exact map of what would need to change to flip it positive.

Decision card: if your agents keep a persistent memory file reread across sessions, check whether its contents are treated as data or as instructions; if one agent's output can end up in another agent's memory file, add a short system-prompt warning against self-propagating instructions, which cut engineered spread to near zero even under 150+ adversarial attempts; weigh the mind-virus headlines against the actual numbers, a mechanism that worked about 55% of the time in engineered lab tests but zero confirmed spreads across roughly 2,000 archived real-world candidate cases; and if you route agent output through a shared feed instead of direct memory writes, treat that as one added friction point, not a substitute for validating what gets written to memory.

Frequently asked questions

Is the AI mind virus a real, ongoing threat right now?

Not one that has been caught spreading on its own. Anthropic and EPFL researchers showed the mechanism can work in engineered lab tests, infecting the next agent more than half the time when a payload lands in the right kind of memory file. But when they separately scanned real, archived agent activity for evidence of that happening unassisted, they found zero confirmed successful propagations out of roughly 2,000 candidate attempts they identified.

What is a prompt injection, in plain terms?

A prompt injection is a hidden instruction embedded inside content that an AI system reads, such as a document, a webpage, or in this case a memory file, that the AI mistakes for a legitimate command from its user or operator rather than treating as plain information to summarize or reference.

Has this paper been peer-reviewed?

No, not yet. It is a preprint, meaning the authors have made the paper public before it has gone through formal review by other researchers in the field. The findings and methodology are open for scrutiny, which is part of why the team also published its code and interaction transcripts alongside the paper.

Should teams building multi-agent AI systems worry about this today?

Not about an active threat, since none was confirmed in the wild, but the underlying mechanism did work in engineered tests, so the paper is worth reading as a design checklist rather than dismissed. Teams using persistent memory files across multiple agents should check whether those files are treated strictly as data or whether their contents can be acted on as instructions, particularly when one agent’s output can end up written into another agent’s memory. The paper’s own tested fix, a short warning against self-propagating instructions added to the system prompt, is a reasonable starting point.

How is this different from the separate Anthropic multiagent systems report?

The memory-worm preprint is a narrow, specific experiment about propagation through shared memory files. Anthropic’s Frontier Red Team report, published days later, is a broader survey of four different multiagent failure patterns, including coordination breakdowns and conformity behavior. They cover related ground but are distinct pieces of work with separate findings.

#ai-agents#prompt-injection#anthropic#multi-agent-systems#ai-safety