Blog

9 ways agent memory fails in production

Stale facts, contradictions, cross-user leaks, over-retrieval, bloat, wrong attribution, missing time context, silent write failures and runaway cost: the symptom, cause and fix for each.

Jonathan Bree

Agent memory usually fails in production in one of nine ways: stale facts, unresolved contradictions, cross-user leaks, over-retrieval, memory bloat, wrong attribution, missing time context, silent write failures and runaway cost. Each has a recognisable symptom and a specific cause, and most are cheaper to prevent than to debug after users notice. This catalogue gives the symptom, the cause and the fix for each, so you can check your own system against it.

Memory problems are hard to spot because the agent rarely errors. It answers fluently, with confidence, using the wrong context. The failures surface as a support ticket, an odd recommendation or a security review question, often weeks after the bad memory was written. That delay is the reason it pays to know the patterns in advance.

1. Stale facts

Symptom. The agent acts on information that used to be true. It suggests a plan the customer has since upgraded from, addresses a user by a job title they left in the spring, or books meetings in a timezone they no longer live in.

Cause. The memory store has no notion of a fact being superseded. A new statement is written alongside the old one, and retrieval returns whichever is more similar to the query. This is memory drift, and it gets worse the longer a user has been active.

Fix. Updates have to replace, not append. When a new fact covers the same subject as an old one, the old one should be marked as superseded or removed at write time, and retrieval should prefer recent information. We make the broader case for this in forgetting is a feature.

2. Unresolved contradictions

Symptom. The agent gives different answers to the same question on different days, or hedges between two incompatible facts. “You mentioned you are vegetarian, but you also said you love steak.”

Cause. Two memories conflict and nothing has decided which one is right. Sometimes one is stale, sometimes one was mis-extracted, and sometimes both were true in different contexts. A plain vector store has no mechanism to notice the conflict at all.

Fix. Detect conflicts when memories are written and resolve them with a rule: newer wins for changeable facts, explicit statements beat inferences, and context-specific facts are kept with their context. Contradiction resolution is the general technique, and our engineering write-up on how M-1 resolves contradictions covers the details and the cases that are still hard.

3. Cross-user leaks

Symptom. One user’s information appears in another user’s conversation. It may be harmless the first time, a stray preference, and it is the incident every enterprise buyer asks about.

Cause. Memories for all users share one store and are separated by a filter on a user ID. A single query that forgets the filter, a background job that runs unscoped, or a retrieval path added in a hurry returns other users’ data. This is cross-tenant data leakage, and it fails silently.

Fix. Enforce memory isolation structurally, with a separate store or namespace per user or tenant that a scoped call cannot escape. Treat the default, unscoped path as an error in multi-tenant code. We go through the patterns in our posts on WHERE-clause isolation and per-tenant memory patterns.

4. Over-retrieval

Symptom. Answers become vaguer and slower as users accumulate history. The agent mentions loosely related details that were not asked about, or misses the one fact that mattered among ten that did not.

Cause. Retrieval returns a fixed number of results regardless of relevance. As the store grows, more memories look plausibly related, and the prompt fills with noise. Top-K retrieval is a sensible starting point and a poor long-term default, as we argue in top-K is the wrong default.

Fix. Rerank candidates and drop low-scoring results instead of always passing the top few. Reranking with a threshold keeps prompts small when little is relevant. Query expansion helps in the opposite case, when the answer spans several memories that a single query would not find together.

5. Memory bloat

Symptom. The store grows faster than the useful knowledge in it. Duplicates pile up: “prefers email”, “likes email over calls”, “please email me”. Retrieval quality drifts down month by month.

Cause. Every extraction writes new records and nothing merges them. Teams that store raw conversation chunks as memory see this fastest, which is one reason we argue against storing every conversation.

Fix. Consolidate. Memory consolidation merges duplicates and near-duplicates into one memory, and memory decay lets rarely used, low-value memories fade or be pruned. Run consolidation continuously or on a schedule, and track the ratio of memories to distinct facts as a health metric.

6. Wrong attribution

Symptom. Facts end up attached to the wrong person or thing. The user’s colleague’s dietary needs are treated as the user’s own, or two clients with similar names are merged into one.

Cause. Extraction cannot tell which entity a statement is about, or it cannot recognise that two mentions refer to the same entity. “Alex said they would join” and “my manager Alex” may or may not be the same Alex.

Fix. Resolve entities at write time. Entity resolution links mentions to a single identity and keeps distinct identities apart. Where confidence is low, store the ambiguity rather than guessing. Our explainer on entity resolution in agent memory covers the common failure cases.

7. Missing time context

Symptom. The agent treats past events as current. It asks how the product launch is going three months after it shipped, or reminds a user about a deadline that has passed.

Cause. Memories are stored without a sense of when they were true. An event and a standing fact look identical to retrieval, so “is preparing for the launch” survives long after the launch.

Fix. Keep timestamps on every memory, distinguish events from standing facts, and weight retrieval towards recent information. Recency weighting handles the common case. For domains where history matters, such as account changes or clinical timelines, a temporal knowledge graph approach that records validity periods is worth the extra effort.

8. Silent write failures

Symptom. The agent forgets things the user clearly told it, but only sometimes. Nothing in the logs shows an error.

Cause. Memory writes are often asynchronous and fire-and-forget. A rate limit, a timeout or a credit limit causes a write to fail, and the application never checks. Retries without idempotent writes can cause the opposite problem, duplicate memories.

Fix. Treat memory writes like any other important background job. Check the job status, handle HTTP 429 with backoff and sensible retry logic, alert on failure rates, and log a trace ID for every write so a missing memory can be followed back to the request that should have created it. Good agent observability covers memory writes as well as model calls.

9. Runaway cost

Symptom. The memory feature works, and the bill grows faster than usage. Per-request cost climbs as users age.

Cause. Memory is implemented by loading more history into each prompt, so input tokens grow with every conversation. Or retrieval runs expensive steps on every turn regardless of whether the question needs them. We walk through the arithmetic in what a 200-message conversation really costs.

Fix. Retrieve a small set of relevant memories instead of history, budget tokens for memory explicitly, and reserve heavier retrieval options for questions that need them. Measure average input tokens per request over a user’s lifetime, not only at launch. The reduce token costs page explains the approach in more depth.

The nine at a glance

Failure

Typical symptom

Root cause

First fix

Stale facts

Acts on outdated details

New facts appended, not replaced

Supersede at write time

Contradictions

Inconsistent answers

No conflict detection

Resolve conflicts on write

Cross-user leaks

Another user’s data appears

Filter-based separation

Structural isolation per user

Over-retrieval

Vague, noisy answers

Fixed top-K

Rerank with a threshold

Memory bloat

Quality drifts down

No merging

Consolidation and decay

Wrong attribution

Facts on the wrong person

Weak entity handling

Entity resolution on write

Missing time context

Past events treated as current

No timestamps or validity

Timestamps and recency weighting

Silent write failures

Forgets some things

Unchecked async writes

Check jobs, retry, alert

Runaway cost

Cost grows per user

History in every prompt

Retrieve memories, budget tokens

How to catch these before users do

Most of these failures can be tested for. Build a small golden dataset of conversations that include a changed fact, a contradiction, two similarly named people, an expired event and a second user, and run it against your memory layer on every change. A good agent evaluation suite asks what the agent remembers after each script, not only whether its final answer sounds right. Pair it with dashboards for write failures, memories per user and input tokens per request. The production checklist for agent memory turns these into a pre-launch list.

How Exabase handles them

Exabase covers several of these failures in the memory layer, and leaves product decisions to you. Exabase Memory runs on the M-1 engine, which resolves contradictions and entity references when memories are written, consolidates related facts over time and retrieves with hybrid search and recency bias. Retrieval can be tuned per call with expandQueries, rerankCandidates and rerankThreshold, as described in retrieving memories.

Isolation comes from Bases: scope memory calls with the X-Exabase-Base-Id header and they cannot read another Base’s data. If the header is omitted, calls go to the base tied to your API key, so multi-tenant code should always set it, as the memory scoping guide explains. Inferred memory writes are asynchronous and return a job you can check with the memory job status endpoint, every response carries an x-trace-id header, and exceeding the rate limit returns HTTP 429, with limits listed in the rate limiting docs. More on the overall approach is on the agent memory solution page.

FAQs

What are the most common agent memory problems?

Stale facts, unresolved contradictions, cross-user leaks, over-retrieval, memory bloat, wrong attribution, missing time context, silent write failures and runaway cost. Stale facts and contradictions tend to appear first.

Why does my agent remember outdated information?

Because new facts are being added next to old ones instead of replacing them. Resolve conflicts when memories are written and weight retrieval towards recent information.

How do memories leak between users?

Usually through a shared store separated only by a user ID filter. One unscoped query exposes other users’ data. Separate stores per user or tenant prevent it structurally.

Why does retrieval quality get worse over time?

Duplicates accumulate and a fixed top-K returns more loosely related memories as the store grows. Consolidation and threshold-based reranking address both.

How can I tell if memory writes are failing?

Check the status of each write job, alert on failure rates and log a trace ID per write. With Exabase, inferred writes return a job ID you can poll.

Does adding memory increase token costs?

It does if memory means loading history into the prompt. Retrieving a few hundred tokens of relevant memories instead usually lowers cost compared with sending full history.

How do I test agent memory before launch?

Script conversations that change a fact, introduce a contradiction, mention similar names and include a second user, then check what the agent remembers afterwards.

Which of these does Exabase handle automatically?

Contradiction and entity resolution, consolidation and recency-weighted retrieval happen in the M-1 engine. Isolation comes from Bases. Monitoring writes and budgeting tokens remain part of your application.

Related pages: Agent memory solution, Memory poisoning, Tenant isolation, Why agents forget, Memory drift explained, Customer support agents, Mem0 vs Zep, Exabase vs Zep, Anatomy of a memory, Shared vs private memory, Context engineering is backend engineering

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.