Expand description
Loop detection for agent loops.
Detects three types of repetitive behavior:
- Exact repetition — identical action signatures (catches trivial loops)
- Semantic repetition — normalized signatures via
normalize_signature(catches loops where the agent retries the same intent with different flags, quotes, or fallback chains) - Output stagnation — identical tool outputs despite varied commands (catches loops where the agent tries different approaches but gets the same result)
Each signal tracks consecutive matches independently. The worst signal
determines the returned LoopStatus.
Structs§
- Loop
Detector - Detects repeated action patterns in agent loops.
Enums§
Functions§
- normalize_
signature - Normalize an action signature to its semantic category.