Skip to main content

Module guard

Module guard 

Source
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§

GuardConfig
Configuration for the loop guard thresholds.
LoopGuard
Circuit breaker that watches for repetitive tool call patterns and enforces a maximum iteration count.

Enums§

GuardVerdict
Graduated response level from the guard.
LoopGuardVerdict
Legacy verdict type for backward compatibility with the fighter loop.