Definition
Context Drift is the gradual degradation of an AI agent’s reasoning coherence, instruction fidelity, or goal focus as its conversational context window fills with lengthy histories and tool responses.
Purpose
Pinpoints the root cause of late-session agent failures, guiding developers to implement periodic state summarization and context pruning mechanisms.
Key Concepts
How It Works
As token lengths expand, the model's self-attention attention weights disperse, reducing adherence to system prompts and causing task derailment.
Related Terms
- Context Engineering
- Agent Harness
- Prompt Engineering
- Memory Management
Sources
- Nelson F. Liu et al., Lost in the Middle: How Language Models Use Long Contexts
- Thoughtworks Agent Research