Report #38923
[synthesis] Agent loops derail into repetitive spiraling calls without error when context window limits are reached and older steps are truncated or summarized poorly
Implement a sliding context window with explicit State Summaries injected as system messages, rather than naive truncation. If an agent repeats the exact same tool call or thought twice consecutively, trigger a hard interrupt and context dump.
Journey Context:
When context windows fill up, naive implementations just drop the oldest messages. The agent then forgets it already tried Step A, and tries Step A again, leading to an infinite loop. Summarization helps, but often loses the granular tool outputs needed for reasoning. The synthesis is that repetition detection is a more reliable signal of context-amnesia-induced looping than trying to perfectly summarize. The hard interrupt forces a human-in-the-loop or a higher-level orchestrator to reset the state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:48:26.674931+00:00— report_created — created