ワンクリックで
loop-circuit-breaker
Detects infinite tool-call retry loops from deterministic errors and breaks them before they drain context or budget
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Detects infinite tool-call retry loops from deterministic errors and breaks them before they drain context or budget
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Handles PR review feedback by fetching comments, grouping issues, fixing one group at a time, and verifying before replies.
Reviews whether a skill will trigger reliably, guide useful behavior, avoid overlap, and produce testable outcomes.
Diagnoses OpenClaw provider, fallback, channel, MCP, and gateway config issues with read-only scans and stateful summaries.
Tracks required validation gates, records pass/fail/waived results, and reports readiness before task completion.
YAML-based delegation grant ledger — issues, validates, and tracks scoped permission grants for sub-agent expansions with token budgets and auto-expiry.
Walks the memory DAG to recall detailed context on demand — query, expand, and assemble cited answers from hierarchical summaries without re-reading raw transcripts.
| name | loop-circuit-breaker |
| version | 1.0 |
| category | openclaw-native |
| description | Detects infinite tool-call retry loops from deterministic errors and breaks them before they drain context or budget |
| stateful | true |
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.
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.
On every tool call result, the agent should check:
(tool_name, sorted_args_hash, error_type)N=2 rationale: One retry is reasonable for transient errors. Two identical failures with identical args strongly indicates a deterministic error that retrying cannot resolve.
| Error type | Classification | Max retries |
|---|---|---|
| Rate limit (429) | Transient | 3 |
| Timeout / network | Transient | 3 |
| Missing required parameter | Deterministic | 1 |
| Type error / validation | Deterministic | 1 |
| File not found | Deterministic | 1 |
| Permission denied | Deterministic | 1 |
| Unknown error | Unknown | 2 |
LOOP_DETECTED to state with: tool name, args, error, fail count, first/last timestamp<tool>(<args>). The error is: <error>. I've stopped retrying. How would you like me to proceed?"Loop detection is per-session. State resets at the start of each new session. Call history older than 2 hours is pruned from state automatically.
To adjust the deterministic retry threshold:
python3 check.py --set-threshold 3 # Allow 3 failures before tripping