loop-circuit-breaker

Installation
SKILL.md

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:

  1. Was this tool call a failure (error, exception, or empty result)?
  2. Normalise the call signature: (tool_name, sorted_args_hash, error_type)
  3. Look up this signature in the session's call history in state
  4. If the same signature has failed N times (default: 2), trigger the circuit breaker
Related skills
Installs
16
GitHub Stars
61
First Seen
Mar 21, 2026