Intermediate · Systems
Context Drift
Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.
TL;DR. The gradual divergence of an agent's working context from the actual task or world state, degrading its decisions over time.
Technical Definition
The gradual divergence of an agent's working context from the actual task or world state, degrading its decisions over time.
How it works
Context drift appears in long-running agents as accumulated staleness: the file it read fifty steps ago has changed, the summary of a summary has lost the original constraint, or the goal has quietly been replaced by a sub-goal the agent latched onto. Symptoms include repeating completed work, contradicting earlier decisions, and confidently acting on outdated state. Mitigations include re-anchoring on the original objective each cycle, timestamping observations, re-reading rather than remembering mutable state, and validating summaries against source artifacts.
Related Concepts
- Context Evolution — How an agent's context changes over the course of a task as steps, observations, and summaries accumulate and replace one another.
- Agent Memory — Information an agent retains beyond the current context window — episodic history, learned facts, preferences, and task state.
- Context Compaction — Compressing accumulated history into a smaller, higher-density representation so an agent can keep working within its token budget.
- Context Lifecycle — The stages a piece of context passes through: acquisition, validation, injection, use, compaction, persistence, and expiry.