~/thinking/context-drift-in-long-lived-agents.md
Context Drift in Long-Lived Agents
Long-lived agents have a problem that better memory won't solve: context drift.
OpenAI's pitch for Dots is agents that work toward your goals 24/7 and learn from feedback over time. It got me thinking less about what they can do and more about what happens to their context after weeks of running.
Context can't accumulate forever. Eventually history gets compacted, summarized, rebuilt. Compaction does lose things. The subtler failure is drift: the objective fades, stale facts get overweighted, a constraint goes missing, and the agent keeps doing things that are locally reasonable but no longer serve the goal.
Imagine a simple failure:
Week 1: "Don't send the client anything until legal signs off."
Week 3, a few compactions later, that survives as "client is waiting on the contract."
The agent sees a waiting client, drafts the email, sends it.
Every step was locally reasonable. The constraint was just gone.
OpenAI clearly thought about part of this — background research runs read-only, and actions go through approval rules. That limits blast radius. It doesn't solve drift.
The fix isn't more memory. It's a context reconciliation layer: deterministic checks on durable state — is this fact still current, does this constraint still apply, what's the source of truth — plus model reasoning to rebuild what actually matters right now.
Run it periodically in the background, and again before any high-impact action. Not by asking the user every time context gets uncertain — that defeats the point of autonomy.
The model can help rebuild the working context.
It should not be the one defining the truth.
Mature long-lived agents will look less like "LLMs with infinite memory" and more like systems that continuously reconstruct the right context from durable state.
The hard problem is not remembering more.
It is knowing what still matters.
#EnterpriseAI #AIAgents #OpenAI #AI