Context Drift
The gradual divergence of an AI session's working assumptions from the governed operational context that was established at session start.
Definition
Context drift is the gradual divergence of an AI model’s working assumptions from the governed operational context that was established at session start. As a session progresses, the model accumulates information from conversation history, file reads, tool outputs, and its own prior responses. Without a governed, append-only context record, these accumulated inputs can silently shift the model’s operational frame.
Context drift is distinct from simple context loss (exceeding the context window). It occurs even within a single session, as the model’s effective understanding of the operational state diverges from the governed baseline.
Why It Matters
Context drift is operationally dangerous because it is silent and self-reinforcing. The model continues to produce output that appears coherent — it does not produce an error or signal that its context has drifted. The divergence only becomes visible when outputs are audited against the original governed intent, or when a downstream issue is traced back to an undocumented decision.
The longer a session runs, the more opportunities exist for context drift to compound. A model that has drifted significantly from governed context may:
- Make architectural recommendations that contradict established constraints
- Suggest changes that violate approved dependency policies
- Produce outputs that are inconsistent with earlier decisions in the same session
Difference from Operational Drift
Operational drift refers to the divergence of a deployed system’s actual state from its governed operational intent — accumulated over time across many sessions.
Context drift is session-scoped. It describes the divergence within a single AI-assisted session. Both are failures of operational governance, but at different timescales.
Prevention
Context drift is addressed through deterministic context composition. When a session begins with a governed, verified context record — rather than relying on the model’s inference of operational state — the baseline is fixed. The model operates from a known, governed starting point.
Rules and Roles in the Yanzi Context Library provide additional constraints that limit the scope within which context drift can occur.