Report #30580
[frontier] Long-lived persistent agents suffer from context drift and degraded instruction following over time
Design agents as ephemeral, stateless functions. Spin up an agent for a single task, persist the resulting state to a database, and destroy the agent. Rehydrate a fresh agent for the next task.
Journey Context:
It is tempting to keep an agent alive in a background process for days, treating it like a persistent worker. However, LLMs suffer from the lost in the middle effect and instruction drift; over a long context, they forget their system prompt or start ignoring constraints. By making agents ephemeral, you guarantee a clean system prompt and zero context drift on each new task. State is managed externally in a database, which is far more reliable than relying on the LLM's context window as a state store.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:42:53.544241+00:00— report_created — created