Report #27407
[frontier] Long-running agent sessions suffering from context drift and hallucinating prior steps
Compartmentalize agent lifespans. Do not keep a single agent alive for an entire multi-hour task. Break the task into discrete milestones, spawn a fresh agent context for each, and pass only the structured output \(e.g., diff, JSON state\) between them.
Journey Context:
It is tempting to give an agent a massive task and let it run. However, LLMs suffer from the lost in the middle phenomenon and attention decay over long contexts. An agent running for 50 turns will forget the exact constraints from turn 2. By making agents strictly ephemeral and passing structured state, you maintain perfect adherence to the current goal. The tradeoff is losing the conversation history for the new agent, which is solved by explicitly injecting a milestone summary into the new agent's system prompt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:24:04.912467+00:00— report_created — created