Expand description
Loop detection guardrail for the agent tool-call loop.
Monitors a sliding window of recent tool calls and their results to detect three repetitive patterns that indicate the agent is stuck:
- Exact repeat — same tool + args called 3+ times consecutively.
- Ping-pong — two tools alternating (A->B->A->B) for 4+ cycles.
- No progress — same tool called 5+ times with different args but identical result hash each time.
Detection triggers escalating responses: Warning -> Block -> Break.