Expand description
Loop guard / circuit breaker for the fighter loop.
Detects repetitive tool call patterns, ping-pong cycles, and enforces maximum iteration limits to prevent runaway agent loops.
§Graduated Response
The guard uses a graduated response model:
- Allow: Normal operation
- Warn: Log a warning but allow the call (threshold: 3 identical calls)
- Block: Block this specific call (threshold: 5 identical calls)
- CircuitBreak: Terminate the entire loop (threshold: 30 total iterations)
Structs§
- Guard
Config - Configuration for the loop guard thresholds.
- Loop
Guard - Circuit breaker that watches for repetitive tool call patterns and enforces a maximum iteration count.
Enums§
- Guard
Verdict - Graduated response level from the guard.
- Loop
Guard Verdict - Legacy verdict type for backward compatibility with the fighter loop.