Report #43664
[synthesis] Agent bypasses exact-match loop detection before hard failure
Implement semantic similarity scoring \(e.g., cosine similarity > 0.85\) on consecutive assistant thoughts/tool calls, rather than string equality, to detect degenerate loops early.
Journey Context:
Naive loop detectors look for identical sequential tool calls. LLMs rarely repeat the exact same JSON payload; they rephrase the query or add trailing spaces. Teams only realize this in retrospect when auditing failed runs: the agent looped 20 times with slightly different arguments, burning tokens. Semantic similarity catches the 'vibes' of the loop before the max\_iteration exception triggers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T03:45:50.929186+00:00— report_created — created