Skip to content

What happens when an untrusted instruction enters memory and later influences other memories or decisions? ​

TL;DR

  • An instruction from untrusted input can be stored, rewritten into other memories, and read as trusted in a later session. Anthropic, Zep
  • Deleting the original without tracing its dependents can leave rewritten memories and actions in place. Zep, Wang et al.
  • Documented recovery mechanisms differ: some trace or withdraw dependents, some restore versions, and some hold suspicious writes for review. Zep, Google, AWS
  • A source label is evidence to investigate, not proof of truth: its value depends on the code and records that created it. Zep, Zep documentation

A team finds a planted instruction in an agent's memory. Removing the text is an obvious first question. The harder one is whether the agent summarized it, used it to create another memory, or acted on it before anyone noticed.

Reading the question as three steps (an instruction is written into memory, other records are derived from it, and decisions rely on what was derived) is this page's framing; every behaviour is taken from vendors' documentation and blogs, standards, papers, or practitioners' own words. The question itself is Himanshu Deshbhratar's, from his 18 October 2026 Medium article about MemoryGuard, his hackathon project.

A derived record is a record built from other records by extraction, summary, consolidation or reflection. Zep, Google, and Hindsight document different forms of derivation.

The way back is the path from a derived record or decision to its source, through which affected records or decisions can be found, withdrawn or rolled back where those operations are available. Zep describes tracing transformations; Google documents revision rollback.

Three steps: written, derived, relied on ​

The path begins when a memory write turns content from a conversation, document or tool result into something the agent can retrieve later. It continues when another operation extracts, merges or summarizes that content. It matters operationally when a later response or action relies on the resulting record.

Those steps are a way to investigate an incident, not a claim that every system implements the same pipeline. For example, Google's revision documentation says a memory can combine data derived from multiple requests and sources. LangChain describes a separate agent extracting facts from conversations and merging them into existing memories.

How an untrusted instruction gets written into memory ​

Anthropic's memory-store documentation warns that a successful prompt injection in user prompts, fetched web content or third-party tool output could write malicious content into the store. As the discussion of Anthropic's memory API explains, a later session can then read that content as trusted memory.

The sources also describe routes that do not need a direct write to a memory file. Microsoft's Zero Trust guidance describes instructions embedded in documents an agent summarizes or indexes. The authors of MINJA describe injecting records through interactions with an agent using queries and observed outputs.

A memory write gate places a check before content is stored; against injection specifically, AWS describes checks before event ingestion and again before consolidation, and LangChain Deep Agents says organization memory is typically read-only to prevent prompt injection via shared state.

Hindsight's Memory Defense screens retain calls before content reaches storage, and a rule in its memory banks API names a detector, such as prompt_injection, and an action, one of allow, redact, quarantine or block. Its three limits belong together: prompt injection blocking is a Cloud Enterprise feature, the open-source version implements only the sensitive-data rule, and enabling the defense affects only future retain calls (Memory Defense guide). This page's reading: controls for future writes do not repair memory already written.

How derived records carry it forward ​

A rewrite can make an instruction harder to recognize. Zep's blog says a summary of user content remains user content: the model's restatement is not an independent source. In the authors' account of Memory Provenance Laundering, consolidation can retain an action trigger while erasing the low-trust origin that should have limited its authority.

This page's reading is that each rewrite is a place where a source label can be lost. It is also a place where a link can be preserved. Google says a revision generated through GenerateMemories includes information extracted before consolidation. Mem0 says its Dream pattern memories link back to the memories from which they were distilled.

AWS's guidance calls for another check before consolidation because extraction runs asynchronously from event ingestion. In AWS's words, that second check "catches anything that made it past the first check." The separate consolidation comparison covers how products describe this transformation.

How decisions come to rely on it ​

The effect is not limited to a misleading summary. Anthropic's research blog says a note that is wrong from the start, or that drifts as the environment changes, can be read and trusted in a later session. Louck's paper describes untrusted content stored in one session steering a consequential action in another.

A record of what the agent read is not proof that the record caused an action, and MemoryGuard's own code draws that line. In the MemoryGuard hackathon project (code at commit e1ff7dee7f, 19 October 2026), recorded retrieval is evidence of exposure, not proof of downstream causation. Deshbhratar's article adds that "Dependent memories and decisions are marked review_required, and the system blocks decision revalidation while a quarantined dependency remains." This page's reading is narrower still: a decision can be audited against a memory only if something recorded what it read or otherwise connected the two.

Zep's blog describes querying valid_at and invalid_at to see what the graph held true when a decision was made. For a payment example, it describes checking the approved account in the vendor system of record rather than treating memory as payment authorization. Source reliability at retrieval is a separate question, covered in which source to trust.

What vendors document as the way back ​

This page's reading is that the way back consists of several different functions: finding a dependent record, taking it out of use, restoring an earlier state, and holding a suspect write. The table describes the pages read, not a product ranking.

SystemWhat is derivedHow to find the derivedHow to withdraw or roll backWho writes the linkStatus on the read date
ZepFacts, entities, observations and summaries from episodes; Skills from captured runs.Associations to episodes; Skill steps cite runs.Affected Skills leave search until repaired; earlier Skill versions can be restored.Zep records associations; the application writes episode metadata.Documented in v4 docs.
GraphitiEntities and relationships from episodes.Lineage to source episodes.Changed facts are invalidated rather than deleted.Graphiti records episode links.Open-source README; its README says the reference servers "do not detect or block prompt injection."
Google Memory BankMemories consolidated from extracted data and existing content.For a memory changed through GenerateMemories, the revision also holds what was extracted before consolidation; revisions can be labeled with a source ID and filtered by it.Roll back a memory to the revision before a change.Revisions are maintained automatically; source labels can be supplied for filtering.Revision documentation.
Claude Managed Agents memory storesA dream (research preview) produces a separate output memory store; "The input store is never modified".Versions identify changes and attribute writes to sessions.Inspect or restore an earlier snapshot.Writes produce versions attributed to the session.Beta. Versions are retained for 30 days, with recent versions of a live memory kept regardless of age.
HindsightObservations from underlying facts.Observations regenerate from their source facts; a lookup from a fact to its observations is not described on the pages read.Correct or retire facts; correction drops old derived observations and links, then reconsolidates.Not described on the pages read.Memory Defense screens future retain calls only. Prompt injection blocking is Cloud Enterprise; open source implements the sensitive-data rule.
CogneeSession feedback and distilled lessons can depend on earlier turns.Recorded graph use and provenance identify affected session records.Its documented forget flow removes the contaminated chain. Rollback requires a snapshot exported first.Not described on the pages read.Documentation describes an opt-in audit ledger; it says old node and document copies are not kept.
LettaNot described on the pages read.Memory edits are committed to the MemFS git repository.Version history is documented. A restore procedure is not described on the pages read.Each memory edit is committed to git.MemFS documentation.
Mem0Dream distills pattern memories from memories.Pattern memories link to their evidence; the history API describes the conversation input for a change.Dream is documented as non-destructive. Rollback is not described on the pages read.Dream links patterns to their source memories.Dream and history API documentation.
AWS Bedrock AgentCore MemoryConsolidation summarizes or merges events into long-term records.The guidance describes retaining context with quarantined inputs. Derived-record lookup is not described on the pages read.Guidance describes human review of ambiguous inputs; an AWS Security Blog sample redirects writes to an isolated quarantine namespace.Not described on the pages read.Documentation and security blog sample.
LangChain Deep AgentsA separate agent extracts facts and merges them with existing memories.Not described on the pages read.Managed Deep Agents describes approval before proposed writes.Not described on the pages read.Documentation; the managed docs say "Automatic hot-memory loading is not covered."
Mnemoverse (publisher)Links between concepts stored together, kept in a concept-association graph; consolidation into prototypes is designed but switched off on the hosted service.provenance records who wrote a memory "whenever authorship was recorded", and reads can filter by author; the revision chain of a corrected memory is readable. A lookup from a memory to records derived from it is not described on the pages read.A correcting write with supersedes marks earlier memories replaced and keeps them fetchable by ID, but replaced memories still appear in default reads unless the organization switches on "Hide replaced memories". Deletion, per memory or per domain, is documented as destructive and "does not touch the tenant's learned concept associations". Quarantine and restore to a revision are not described on the pages read.The writer names supersedes; how provenance is set is not described on the pages read.API reference. The MCP tool accepts supersedes since 0.18.0, not in shared rooms.

This page reads the standards as asking for the same pieces. MITRE ATLAS v2026.10 (release of 28 October 2026, technique AML.T0080.000) describes memory hardening as enabling poisoned records to be identified, quarantined and rolled back. Microsoft's agentic memory guidance says to track where memory propagated and to label provenance on every memory entry. The OWASP Top 10 for Agentic Applications 2026 asks for lineage metadata for every propagated action, to support forensic traceability and rollback validation.

Where the way back stops ​

This page's reading is that lineage is only as complete as the records and code that write it. Zep says application-written episode labels are only as trustworthy as the code assigning them. Its v4 documentation warns against treating customer-writable or model-generated metadata as a trusted security label. Its facts documentation also says source fields do not establish that a source or derived fact is true.

MemoryGuard illustrates the distinction between declared and observed links. Its README describes DERIVED_FROM as lineage asserted by a writer and EXPOSED_TO as possible influence when a record was written in a context that retrieved a memory. This page's reading is that the record least likely to declare a suspicious parent may be the injected one; recorded exposure can widen an investigation, but it does not prove influence.

The MITRE ATLAS memory-hardening entry describes controlling writes, preventing saved data from becoming higher-authority instructions, and enabling identification, quarantine and rollback. This page's reading is that those are distinct controls, and a source label alone does not perform all of them.

Deleting the source is not rolling back ​

Zep's blog warns that deletion which ignores lineage leaves derivatives in place. It also describes a more specific case: deleting an episode removes a derived fact only when no other episode supports it, while shared entity names or summaries can retain poisoned wording until edited or resummarized. The blog's own summary is that "A poisoned source can be found and most of its effect reversed without clearing the store."

The authors of Dependency-Guided Rollback Repair distinguish removing a source from repairing propagated claims, derived memories and actions. Their proposed method traces explicit dependencies and selectively replays affected computation. This page's reading is that restoring a memory version is not the same as undoing an external action already taken.

The Non Human Identity Management Group response playbook advises taking suspect content out of service before deletion, restoring a snapshot from before the first poisoned write, and replaying legitimate writes made afterward. It also advises planning a wider rollback if retrieval logs do not identify the entries read.

What this page does not claim ​

No test of any vendor's memory, no attack and no experiment. The three steps and the reading of the way back as several different functions are this page's framing. Behaviours are the vendors' documented ones on the date in Sources; Claude Managed Agents memory stores are in beta and Claude's dreams in research preview, Hindsight's prompt injection blocking is a Cloud Enterprise feature, and AWS's quarantine-namespace flow is a sample on its security blog. Papers are described by their abstracts and authors' conditions. Where a vendor's pages say nothing about a step, the table says so with the pages read; that is not a claim the product lacks it. Blog, playbook and Medium texts are their authors' words with their dates.

Common questions ​

What happens when an untrusted instruction enters memory and later influences other memories or decisions? ​

A later session can read the instruction as trusted memory. Extraction or consolidation can carry its meaning into other records, which may then influence decisions.

What breaks when agent memory is writable without trust controls? ​

False or malicious content can enter memory and shape later sessions. Documented controls include read-only memory, review before a write, screening retain calls, and checks before consolidation.

Can a summary or reflection carry an injected instruction into later sessions? ​

Yes. A summary can keep an instruction while losing its low-trust source. Zep treats a summary of user content as user content, and AWS documents a second check before consolidation.

How do you find which decisions relied on a poisoned memory? ​

You need records that connect the memory to the decision. Zep describes listing derivatives and querying graph state at the decision time; MemoryGuard, a hackathon project, marks dependent memories and decisions for review. Exposure alone does not prove causation.

Can you roll an agent's memory back to before it was poisoned? ​

Where suitable versions or snapshots exist, some systems document a restore or rollback. Google and Claude Managed Agents document revision recovery; Cognee requires a snapshot exported first. Restoring memory does not undo actions already taken.

Sources ​

Vendors' documentation ​

Vendors' blogs ​

Standards and guidance ​

Papers ​

Practitioners ​

Mnemoverse documentation ​

Who wrote this. Mnemoverse publishes this page and is one of the systems in its table, so we are an interested party. That is why every fact here links to the dated page it was read from, and our own row is taken from our public docs the same way. The three steps and the conclusions marked as this page's reading are our analysis. If something here is wrong or has changed, tell us and we will correct it.

Sources were read on 23 November 2026; the page describes them as of that date.

Edward Izgorodin · Mnemoverse · 24 November 2026