Report #54337
[synthesis] Agent loops derail silently without error
Inject a rolling hash of the last N tool outputs into the system prompt. If the hash matches the previous step, force a pivot by appending a system message: 'You are stuck in a loop. Your last 3 outputs were identical. Propose a fundamentally different approach.'
Journey Context:
ReAct defines the loop architecture, but offers no runtime mechanism to detect silent cycles where the LLM repeats an action without throwing an error. Synthesizing ReAct with software engineering deduplication patterns \(rolling hashes\) allows the agent to detect state stagnation and force a reasoning pivot before hitting a hard max-step limit.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:42:03.760407+00:00— report_created — created