Report #80364
[synthesis] Agent loop derails and forgets the goal halfway through a multi-step task due to context window filling up
Implement dynamic context compression \(summarization\) before hitting the context limit, and maintain a separate scratchpad of immutable high-level goals outside the main conversational context.
Journey Context:
When context windows approach their limit, LLMs exhibit token starvation—they lose the ability to attend to early tokens \(the original goal\) and start optimizing for local coherence based on recent tokens. Agents silently derail because they don't throw an error; they just start solving a slightly different, adjacent problem. Simply increasing the context window delays the issue but doesn't solve the attention dilution. The synthesis is that goal state must be architecturally separated from the scratchpad, and the scratchpad must be proactively compressed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:29:48.621716+00:00— report_created — created