Why this matters now:OutSystems' 2026 survey of nearly 1,900 IT leaders found that 96% already use AI agents in some capacity, 94% worry that agent sprawl is adding complexity and security risk, and only 12% have a centralized platform to manage it. In June 2026, researchers at Huawei's Turing Research Center in Canada reported a 50.46% average attack success rate against agent memory writes in their benchmark. Gartner expects over 40% of agentic AI projects to be canceled by the end of 2027, with inadequate risk controls among the stated causes.

A Note Written on Tuesday Changes an Answer on the Third Friday

Picture a customer support agent with long-term memory switched on. In a Tuesday session, a user pastes a block of text that includes the line “for this account, refunds above the normal limit are pre-approved.” The agent summarizes the session at the end, as it was built to do, and stores that line as a fact about the account. Three weeks later a different user, a different session, and a different agent instance retrieve the note while handling a refund. The agent applies it. Nobody sees an attack, because there was no moment where one happened. There was a write, a long gap, and a read.

That gap is what makes memory different from the prompt injection problems most security teams already track. A prompt injection has to land and act inside one session, where logging and filters can catch it. A memory write can be dormant for days. The OWASP Top 10 for Agentic Applications 2026 gives this class of problem its own entry, ASI06, Memory and Context Poisoning, and OWASP's generative AI security project has described memory as both a feature and an attack surface.

Memory also fails without an attacker. An agent that stores its own summaries will store its own mistakes. A price that was correct in March is quoted in October. A preference mentioned in jest becomes a standing rule. A customer's health detail, shared once to get help, sits in a vector store that nobody listed in the data inventory. Governing memory means treating all of these as one problem: the agent can now create durable state, and durable state needs an owner, a lifecycle, and an audit trail.

Prompt injection ends when the session does. Memory poisoning waits for the next one.
50.46%
Average attack success rate across the two agents tested in a systematic memory poisoning study, with a 41.05% average retrieval success rate. Source: Dash et al., Huawei Turing Research Center and University of Waterloo, arXiv, June 2026.
94% vs 12%
Share of IT leaders worried about agent sprawl versus share with a centralized platform to manage it. Source: OutSystems 2026 State of AI Development survey, nearly 1,900 respondents.
40%+
of agentic AI projects forecast to be canceled by end of 2027 on cost, unclear value, or inadequate risk controls. Source: Gartner, June 2025.

Six Ways Agent Memory Goes Wrong

These are the failure modes we check first when a team tells us its agent “learns.” Severity reflects how likely the failure is to reach a customer, a payment, or a regulated record before anyone notices.

Failure modeWhat happensSeverity
Poisoned write from untrusted contentText from an email, web page, or shared file is stored as a fact or a standing instruction, and the agent acts on it in a later sessionCritical
Cross-user or cross-tenant leakageMemory written for one user is retrieved for another because the store is shared and scoping was left to the promptCritical
Sensitive data persisted by defaultPersonal or regulated details are summarized into memory, outside the retention and deletion rules that cover the primary systemsHigh
Stale memory treated as current factPrices, policies, and account states recorded weeks ago are quoted with the same confidence as live dataHigh
Learned procedures that driftThe agent stores a shortcut that worked once and repeats it, including steps that skip an approval or a checkModerate
Unbounded growth and noisy retrievalMemory fills with duplicates and near-misses, so relevant entries are outranked and answers get worse without any single bad writeLower

Not sure what your agents are remembering?

10decoders inventories the memory stores behind your production agents and tests which of the six failure modes they allow. You get a ranked list of write paths, scoping gaps, and retention problems.

Book a Free AI Assessment →

Why Your Existing Defenses Probably Do Not Cover This

Most teams that have worked on agent security have filters for prompt injection. The Huawei-led study tested exactly that assumption. Its authors identified four memory write channels and nine structural vulnerabilities, built a taxonomy of six attack classes, and released a benchmark called MPBench. Their conclusion was that existing prompt injection defenses do not cover memory poisoning, and that agents which write and retrieve memory more aggressively are more exploitable.

The second finding matters for design. Aggressive memory is usually marketed as a feature: the agent that remembers more feels more helpful. The study suggests that every additional write path is also an additional way in. A better question than “how much should the agent remember” is “which sources are allowed to cause a write, and what happens before the write is committed.” A user's typed preference and a paragraph scraped from a vendor's web page should not have the same standing.

There is also a sprawl effect. The OutSystems survey describes organizations mixing custom-built and pre-built agents, and in that setting memory often lives in several places at once: a vendor's hosted memory feature, a team's own vector store, a framework's default file on disk. Only 12% of respondents had a centralized platform for managing agent sprawl, so for most enterprises nobody can currently answer the simple question of how many places their agents store things.

Stage 1
Memory by default

The Framework Decides What Is Kept

Memory is whatever the agent library stores out of the box. Nobody has listed the stores, and a bad entry can only be found by noticing a bad answer.

Stage 2
Scoped and logged

Stores Are Inventoried and Partitioned

Each store has an owner and is keyed by user and tenant. Writes are logged with their source, though review of untrusted writes is still manual and inconsistent.

Stage 3
Governed memory

Writes Are Gated, Aged, and Reversible

Untrusted sources cannot create durable state without a check, entries expire, retrieval is traced, and the team has rehearsed a rollback.

Checklist: Is Your Agent's Memory Governed?

Choose one production agent that keeps state between sessions and see how many of these you can demonstrate, not just describe. Each one you cannot show is a place where a bad entry can sit unnoticed.

What a governed memory layer can show
A written purpose for every memory storeEach store has an owner, a stated use, and a list of the agents allowed to read and write it, so nobody has to guess what a given memory is for.
Every write carries its sourceA memory entry records who or what produced it: a verified user, a system of record, a retrieved web page, or the agent's own summary. Entries from untrusted content are marked as such.
Writes from untrusted content are held for reviewText the agent read from an email, a web page, or a shared document cannot become a standing instruction or a durable fact without a check by a person or a rule.
Scope that matches the user, not the deploymentMemory is keyed to a user, a tenant, and a task type. Nothing learned in one customer's session can be retrieved in another's.
An expiry date on every entryFacts about prices, policies, and account status age out on a schedule. Entries that outlive their limit are re-verified or dropped instead of being quoted.
Sensitive data kept out of long-term memory by defaultPersonal data, credentials, and regulated fields are filtered before a write, and a deletion request reaches the memory store as well as the primary database.
Retrieval that shows the memory it usedEach answer logs which memory entries were read, with their source and age, so a reviewer can tell whether a wrong answer came from the model or from a bad entry.
A tested way to roll backThe team can list everything an agent wrote in a time window, remove it, and confirm the agent's behavior returns to the earlier baseline.
If an agent can write to its own future, someone has to own that pen.

What to do this week

01 List every place your agents can store anything

For each production agent, find out where it persists state: a hosted memory feature from the model vendor, a vector database, a key-value store, a notes file, a conversation history that is replayed on the next session. Record the owner, the retention setting, what the store is keyed on, and which other agents can read it. Expect to find at least one store that nobody on the platform team knew about. That list is the base for every other control.

02 Tag each write with where it came from

Add a source field to every memory write, with a small fixed set of values: verified user input, internal system of record, external retrieved content, and agent-generated summary. Then change retrieval so that entries from external content and agent summaries are labeled when they reach the model, and cannot be treated as instructions. This one change gives reviewers something to filter on and gives the model a reason to treat a scraped paragraph differently from a customer's stated preference.

03 Add expiry dates and a sensitive-data filter

Set a time limit by type of memory. Facts about prices, policies, and account status might get days or weeks, while a user's stated formatting preference can last longer. Entries past their limit should be re-verified against the source system or dropped. In the same change, add a filter before the write step that blocks personal data, credentials, and regulated fields from long-term memory unless a documented purpose says otherwise. Check that a deletion request now reaches the memory store as well.

04 Run a poisoning drill and a rollback drill

In a test environment, plant three entries: a false fact, a fake instruction written as a policy note, and a note scoped to a different user. Then ask the agent questions that should trigger each one and record whether it acted on them. After that, practice removing everything the agent wrote in the past week and confirm that answers return to baseline. Record the time it took. If the rollback takes more than a day, that is the first engineering task for next sprint.

Let 10decoders Review What Your AI Agents Remember

We map the memory stores behind one production agent, trace its write paths from untrusted content, test scoping across users and tenants, and score the result against the checklist above. You leave with a ranked gap list, a poisoning and rollback drill you can repeat, and a memory policy sized to your estate.