Intermediate · Systems
Persistent Agent Context
Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.
TL;DR. Context that survives beyond a single session — durable goals, preferences, project state, and accumulated knowledge.
Technical Definition
Context that survives beyond a single session — durable goals, preferences, project state, and accumulated knowledge.
How it works
Persistent context is what makes an agent feel continuous rather than amnesiac: it remembers the codebase conventions, the user's preferred tone, the decisions already ratified, and where a long-running task was paused. It is stored outside the window — files, databases, vector stores — and selectively rehydrated at session start. The hard problems are staleness (persisted beliefs outliving their truth), scope (whose context is this, and can it leak across tenants?), and consent over what is retained.
Related Concepts
- Agent Memory — Information an agent retains beyond the current context window — episodic history, learned facts, preferences, and task state.
- Context Drift — The gradual divergence of an agent's working context from the actual task or world state, degrading its decisions over time.
- Context Lifecycle — The stages a piece of context passes through: acquisition, validation, injection, use, compaction, persistence, and expiry.
- Operational Agent Context — The live environmental state an agent needs right now — permissions, quotas, system health, current data, and active constraints.