Report #25202
[frontier] Agent context window overflowing and losing track of the original goal during long tasks
Implement a Rolling Context with Milestones pattern: aggressively summarize completed steps into a structured scratchpad, keep the original goal and current step in the active context, and discard raw intermediate outputs.
Journey Context:
Agents often fail on long tasks because they either hit the context limit \(crashing\) or suffer from the 'lost in the middle' phenomenon where they forget the original instruction. Naive summarization loses critical details \(e.g., variable names, exact error messages\). The winning pattern is maintaining a structured scratchpad \(e.g., Markdown or YAML\) that the agent updates with precise milestones, keeping the active working memory small but highly relevant.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:42:34.502690+00:00— report_created — created