loop-circuit-breaker
loop-circuit-breaker
OpenClaw retries all errors identically — whether transient (rate limit, timeout) or deterministic (missing parameter, type error, invalid path). This skill tracks tool call history per session, identifies repeated identical failures, and halts the loop before it exhausts the context window and API budget.
Difference from agent-self-recovery
agent-self-recovery is a manual, reactive recovery protocol — the user or agent invokes it after noticing the agent is stuck.
loop-circuit-breaker is automatic and proactive — it triggers on the 2nd identical failure, before the user even notices.
Detection algorithm
On every tool call result, the agent should check:
- Was this tool call a failure (error, exception, or empty result)?
- Normalise the call signature:
(tool_name, sorted_args_hash, error_type) - Look up this signature in the session's call history in state
- If the same signature has failed N times (default: 2), trigger the circuit breaker
More from archieindian/openclaw-superpowers
context-window-management
Prevents context overflow on long-running OpenClaw sessions. Use when approaching context limits.
28heartbeat-governor
Enforces per-skill execution budgets for scheduled cron skills — pauses runaway skills that exceed their token or wall-clock budget before they drain your monthly API allowance.
27using-superpowers
Bootstrap skill — teaches the agent how to find and invoke skills. Use when starting any new task or session.
23long-running-task-management
Breaks multi-hour tasks into checkpointed stages with resume capability. Use when a task is expected to take more than 30 minutes or multiple sessions.
22fact-check-before-trust
Triggers a secondary verification pass for any agent output containing factual claims, numbers, dates, or named entities before the output is acted on
21persistent-memory-hygiene
Keeps OpenClaw's memory store clean, structured, and useful. Use at session end and during periodic maintenance.
20