repetition_guard
Optional loop brake for identical tool calls repeated in a short window.
What it mitigates
- Stuck-agent retries with identical arguments
- Cost/time burn from deterministic loops
- Cascading failures from repeated no-op commands
Recommended defaults
| Profile | enabled | threshold | cooldownSec | onRepeat |
|---|---|---|---|---|
local | true for autonomous runs | 3 | 60 | deny |
standard | true for long-running bots | 3 | 60 | deny |
unbounded | optional | 3 | 60 | alert |
Minimal config
moduleConfig:
repetition_guard:
enabled: true
threshold: 3
cooldownSec: 60
onRepeat: deny
Persistence in subprocess mode
For OpenClaw hooks (new process per tool call), use SQLite storage:
moduleConfig:
repetition_guard:
store:
engine: sqlite
path: ./.radius/state.db
required: false
Set required: true only when your runtime guarantees node:sqlite.