Heuristic
Treat repeated state-action pairs as a loop alarm
If the state did not change, the same action is usually a retry—not a new strategy.
When it fits
- An agent repeatedly invokes the same tool or applies nearly the same fix without changing the relevant state.
When to avoid it
- Some polling/waiting tasks intentionally repeat; tag those loops separately with time-based conditions.
Why it matters
Record a compact signature of current state plus chosen action. When the same or near-identical pair recurs, flag it as potential looping and require an explicit explanation of what changed to justify another attempt. Otherwise replan, widen evidence or escalate.
An example
The agent searches the same query four times and receives the same results; a loop alarm should force query redesign or stop.
Check your result
Repeated actions require a changed state or new rationale rather than silently consuming budget.
Keep this limit in mind
- Some polling/waiting tasks intentionally repeat; tag those loops separately with time-based conditions.
Evidence and sources
Supports
Autonomous loops can stall, and long-horizon reliability degrades when repeated actions fail to resolve planning or execution problems.
Some polling/waiting tasks intentionally repeat; tag those loops separately with time-based conditions.
Agent Looping · See source record