Report #40036
[synthesis] Agent reasoning loops drift off-topic before hitting max tokens
Compute the semantic similarity \(e.g., cosine distance\) between the agent's consecutive reasoning steps or scratchpad entries. If the distance approaches zero or spikes erratically without state changes, the agent is drifting.
Journey Context:
Token count and step count are the standard proxies for loop detection. However, an agent can spend 10 steps subtly rephrasing the same failed logic or drifting into irrelevant tangents without triggering max\_step limits. Synthesizing trace semantics with step counts reveals that semantic stagnation or erratic jumps precede visible failure, catching the loop long before the hard limit.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:40:27.385849+00:00— report_created — created