Imagine assigning an AI agent a procurement task: find a vendor, keep the total cost under $100,000, ensure customer data stays in Armenia, and obtain approval before making a commitment.
The agent researches vendors, summarizes proposals, consults a second agent, and revises its plan. Each step looks reasonable. Several rounds later, it recommends a $95,000 option whose hosting location is unclear. An earlier summary had compressed “customer data must remain in Armenia” into “prefer local hosting.” The second agent accepted that summary as fact. The recommendation appears to satisfy the budget while missing a nonnegotiable requirement.
This is context drift: a gradual change in the information that actually governs an AI system’s decisions. It may begin with a small omission, an inaccurate summary, an obsolete document, or a mistaken tool result. When the error becomes part of the next step’s context, it can persist and spread.
The challenge matters because agents do more than answer one question. They plan, retrieve information, use tools, maintain memory, and sometimes coordinate with other agents. Every transition is a chance to transform or misinterpret the original task.

A useful distinction is between two records:
Context drift occurs when a meaningful gap between these records persists across steps. A single wrong answer is not automatically drift. Nor is an agent that correctly says, “I do not know where this vendor hosts its data.” Drift is the temporal process by which a requirement, fact, or priority is lost, distorted, or replaced.
The gap can take several forms. Retention drift drops a constraint. Semantic drift turns “must” into “prefer.” Retrieval drift promotes an obsolete source over a current one. State drift confuses what has been approved, completed, or left open. Priority drift lets a secondary goal displace a hard requirement. Coordination drift appears when agents hand different versions of the task to one another. These are different mechanisms, but all can change the next action.
Dongre and colleagues study multi-turn context drift as divergence from goal-consistent behavior. Their experiments measure a difference between token predictions from a test model and a reference model, then use a dynamical model to interpret how that difference changes over turns. In the evaluated settings, drift often settled into a noisy equilibrium, and reminders often reduced it. Those findings are useful, but they do not establish that every production agent will stabilize or that reminders alone will protect consequential actions.
For an organization, the more direct question is operational: Did the agent preserve the requirements that should determine its action?
A model can use only the information available to it. If an earlier requirement has been truncated, the next response cannot recover it from the active conversation alone. Yet merely fitting that requirement into the window does not guarantee reliable use.
In Lost in the Middle, researchers found that many tested models used relevant information less effectively when it appeared in the middle of a long input than near its beginning or end. RULER showed that strong performance on a simple “needle in a haystack” test did not necessarily carry over to harder long-context tasks involving tracing or aggregation.
The distinction is between nominal capacity and effective use. A system might accept a long prompt while still overlooking the one condition that matters most.
Agents also build their own context. They summarize earlier work, retrieve memory, select documents, and incorporate tool responses. Each operation may help, but each is another point where the working representation can diverge from the authoritative record.
1. State discrepancy. Call the verified task state at step t “S(t)” and the version effectively used by the agent “Ŝ(t).” We can define an operational gap, D(t) = d[Ŝ(t), S(t)]. The function d need not be an exotic mathematical distance. In a procurement workflow, it might count missing hard constraints, outdated facts, and unauthorized state changes. This is a proposed engineering measure, not the token-level metric used in the multi-turn study above.
2. Information loss. A fixed-size summary cannot preserve every detail that might matter later in an unrestricted history. If two different histories collapse into the same summary but require different future decisions, a system using only that summary cannot always distinguish them. External records and retrieval can preserve more information, but then the system must find and interpret the right evidence at the right time. Retrieval-augmented generation and tiered-memory designs such as MemGPT address active-context limits; neither makes retrieval infallible.
3. Error feedback. A simple toy model says that the next step’s error depends on some remaining fraction of the current error, new disturbances, and corrective checks. If an agent repeatedly feeds its own unverified conclusions into future plans, an early mistake can persist. If it periodically rebuilds its plan from verified state, the mistake may shrink. The model is an intuition, not a universal law: drift can grow, fade, or stabilize depending on the workflow.

Local accuracy can also be misleading. As a toy calculation, if each of ten dependent handoffs has a 98% conditional chance of preserving a requirement given that all earlier handoffs did, the chance it survives all ten is about 0.98¹⁰, or 82%. That is not a measured agent failure rate; it illustrates why a long chain needs checkpoints even when each step looks strong.
Return to the hypothetical procurement agent. Its instructions specify a $100,000 ceiling and an Armenia-only data residency requirement. Later, it summarizes the brief as “choose an affordable vendor with local hosting.” The wording sounds close, but “local hosting” is not the same as “customer data must remain in Armenia.”
Next, retrieval surfaces an older vendor proposal with a lower price and incomplete residency information. The agent adds it to working memory. A second agent reviews the first agent’s summary rather than the original requirement. Agreement between the two agents creates the appearance of independent confirmation.
No individual step needs to look absurd. The failure lies in the chain: a constraint was weakened, retrieved evidence was insufficient, and the second agent inherited the first agent’s assumption.
The risk becomes more consequential when agents use external tools. Architectures such as ReAct interleave reasoning, action, and observations because interacting with the environment can improve problem solving. Yet a tool response is data; it has no authority to rewrite the task. AgentDojo shows why agents need a firm boundary around untrusted external content: malicious text returned by a tool can try to redirect behavior. Prompt injection is a distinct security problem, but it can cause context drift when untrusted instructions are promoted into the agent’s governing state.
Multiple agents do not automatically solve this. If they share the same incorrect summary or evidence, their errors are correlated. A review is meaningful when the reviewer checks the original requirements and evidence independently.

The most important design choice is to keep business-critical task state outside ordinary conversational memory.
An authoritative, versioned record should contain the objective, hard constraints, permissions, verified facts, completed actions, and open questions. Important facts should carry a source and, when relevant, an effective date. A narrative summary can help the agent work efficiently, but it should not silently change the record.
The workflow can then follow a clear sequence:
This resembles sound database and transaction design. A model may propose that the budget has changed; an authorized update must establish that it has changed. A model may infer that a vendor meets a residency rule; suitable evidence must establish that it does.
Some checks should be deterministic. If a purchase must stay below a fixed ceiling, software can compare the amount with that ceiling. If a payment requires approval, an execution gate can require an approval record. These safeguards do not solve every judgment problem, but they keep a model’s plausible prose from becoming the sole enforcement mechanism.
Retrieval also needs governance. The best semantic match may be an obsolete draft. A useful retrieval layer should consider source authority, version, date, and provenance alongside relevance. When evidence conflicts, the agent should surface the conflict rather than merge incompatible claims into a confident answer.

A single final-answer score misses many of these failures. Teams should test the entire trajectory.
Start with representative tasks and vary where critical constraints appear: at the beginning, in the middle, and after many messages. Add obsolete versions of documents. Force repeated summaries. Introduce ambiguous or erroneous tool results. In multi-agent workflows, check whether one agent’s false premise spreads to others.
Useful measures include:
Monitor these across the workflow, not just at the end. A successful final answer may conceal risky intermediate changes. An error detected and corrected before action is a different outcome from the same error reaching a customer or payment system.
A practical pilot can be modest: select one long-running workflow, name its nonnegotiable constraints, create an authoritative task record, add validation before consequential actions, and run the stress tests above. The results will show which failures come from memory, retrieval, interpretation, tools, or process design.
No open-ended AI agent can guarantee perfect retention and correct action in every possible situation. A bounded representation can lose distinctions from an unrestricted history; external facts can be unknown or change; and some decisions require judgment under uncertainty. These are different limits, and not every error is context drift.
Specific guarantees are possible in a bounded system. A deterministic rule can reject a payment above an approved limit. A workflow can prevent an action without a required authorization record. The aim is to define what must remain true, enforce what can be enforced, and measure the remaining uncertainty.
For dependable agents, the conversation should be a workspace, not the system of record. Preserve the mission in authoritative state. Require evidence for important updates. Check actions before they happen. Reconstruct plans when the working narrative has had too many chances to change.
An agent will sometimes misunderstand something. A well-designed system detects the misunderstanding, contains it, and prevents it from becoming an irreversible decision.
Technical / Solutions Architect
https://www.linkedin.com/pulse/when-ai-agents-lose-plot-understanding-context-drift-armen-melkumyan-qhsof/