Jahanzaib
Memory & Context

Memory Drift

The gradual degradation of agent behavior as in-context memory accumulates stale, contradictory, or no-longer-relevant entries.

Last updated: April 26, 2026

Definition

Memory drift is what happens when an agent's working memory gets polluted over time. Old facts that are no longer true (the user used to prefer email but now prefers Slack), contradictory memories (one episode says cancel, another says do not), and irrelevant clutter (every "okay" and "thanks" preserved verbatim) all accumulate and degrade decision quality. The agent starts contradicting itself, citing outdated facts, or making decisions based on context that should have been pruned long ago. Drift is most visible in long-running conversational agents that never reset their memory.

Drift mitigation has three knobs. First, eviction: pick a policy for deleting old memories (LRU, time-based, relevance-scored). Second, reconciliation: when contradictory memories are detected, run a reconciliation pass that picks the more recent or more authoritative one. Third, periodic compression: rebuild the memory index from raw history rather than letting it accumulate. The right policy depends on workload. A medical agent should never auto-evict; a casual chat agent should evict aggressively.

When To Use

Watch for drift in any agent that runs more than a few weeks per user. The first symptom is the agent contradicting itself in ways it did not at launch.

Sources

Related Terms

Worried about Memory Drift in production?

I've debugged and defended against this in real production AI systems. If you want a second pair of eyes on your architecture or your guardrails, that's what I do.