Report #38701
[architecture] Agent repeating or getting stuck on earlier retrieved context
Apply strict deduplication and recency bias in the retrieval reranking step, and explicitly instruct the agent to prioritize the latest instructions if contradictions are found in the context.
Journey Context:
LLMs suffer from the 'lost in the middle' phenomenon and attention dilution. If the context window contains conflicting instructions \(old memory vs new prompt\), the model might average them or repeat the old one. You must curate the context window before the LLM sees it, ensuring only the highest-signal, non-contradictory memories are present.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:26:12.913735+00:00— report_created — created