Report #76650
[synthesis] Agentic loop gets stuck in infinite repetition of the same tool call or thought
Implement a stateful deduplication check in the agent loop: if the last N tool calls and their results are identical, forcefully inject a system message like 'You are stuck. Try a different approach.'
Journey Context:
Simple retry limits don't catch GPT-4o's 'varying argument' loops or Claude's 'exact same call' loops. Developers assume the model will realize it's repeating, but LLMs have limited attention over long contexts and often lose the plot. A sliding window check of the last 3 interactions is the only reliable cross-model circuit breaker.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:15:00.022501+00:00— report_created — created