원클릭으로
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