error-closed-loop

error-closed-loop is a skill for Claude Code, Codex from yunsii/wezdeck. It costs 43 tokens per session (912 once invoked), scanned C, original, MIT.

A procedure for handling command and platform failures from detection through diagnosis, safe recovery, verification, and reporting. It also defines when to stop and present escalation choices.

In plain words
What is it for?
Investigating non-zero exits, failed execution, missing output, busy files, syntax errors, interrupted command batches, missing commands, update problems, and temporary network errors.
Why use it?
It prevents repeated failed commands and incomplete fixes. Each recovery attempt is checked before the result is reported, so failures are less likely to be hidden.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions AGENTS.md; built for openclaw.

Good fit Investigating non-zero exits, failed execution, missing output, busy files, syntax errors, interrupted command batches, missing commands, update problems, and temporary network errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yunsii/wezdeck/error-closed-loop
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yunsii/wezdeck --skill error-closed-loop
Clone the repo
git clone --depth 1 https://github.com/yunsii/wezdeck

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for error-closed-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/yunsii/wezdeck/error-closed-loop/github.svg)](https://agentmods.dev/skills/yunsii/wezdeck/error-closed-loop)
Your own site
<a href="https://agentmods.dev/skills/yunsii/wezdeck/error-closed-loop"><img src="https://agentmods.dev/badge/skills/yunsii/wezdeck/error-closed-loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for error-closed-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/yunsii/wezdeck/error-closed-loop"><img src="https://agentmods.dev/badge/skills/yunsii/wezdeck/error-closed-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 912 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.00912
Opus 5.5 $0.00017 $0.00365
Sonnet 5.5 $0.00009 $0.00182
Haiku 4.5 $0.00004 $0.00091

Measured 1mo ago against content hash 7fd208cea109, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

error-closed-loop scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

**Never** self-fix without explicit yes: force-push, broad `rm -rf`, prod deploy, disable safeguards.
openclaw/workspace/skills/error-closed-loop/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Error closed-loop (detail)

Always-on doctrine is short in AGENTS.md L0. This skill expands procedure.

Order

1. Detect   — non-zero / Exec failed / empty critical output
2. Diagnose — one factual cause
3. Self-fix — reasonable recovery 1–2 times when safe
4. Verify   — smallest check that proves recovery
5. Report   — user-facing template (even if recovered)
6. Escalate — only if blocked: situation + ≥2 options + recommendation

Self-fix (safe/cheap)

Failure Fix
ETXTBSY bash path/to/script or wait + retry
🛠️ Exec failed / SIGTERM batch Split short execs; re-run missing checks only
Inline SyntaxError / literal \\n in python/node Rewrite body to file (write or claw-script-run.sh); do not re-fire the same -c/-e string
Giant a; b; c chain, later step failed Re-run only the missing step(s); keep probes short
openclaw update + gateway process tree Detached systemd-run --user unit (see exec-risk); never loop the same in-tree update
command not found (e.g. rg) Use absolute path / grep / install only if intended; do not spam retries
429 / flaky network Backoff once
Wrong path realpath / create only if clearly intended
Your leftover lock/process Stop it, retry

Never self-fix without explicit yes: force-push, broad rm -rf, prod deploy, disable safeguards.

Platform Exec failed

Feishu/runtime 🛠️ Exec failed: run A → run B → … = agent exec batch failed, not noise. Explain in plain language the same turn; do not leave the arrow-list undecoded. Prefer short verification batches after writes.

Prevention (preferred over recovery): AGENTS Exec hygiene + skills/exec-risk — short shell, scripts on disk, no gateway-tree self-update. Goal is fewer red cards, not prettier post-mortems only.

Coverage vs OpenClaw platform (important)

This skill still matters: it covers failures that re-enter the current agent turn as tool results (exec non-zero, readable tool errors, self-heal + verify).

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 84 lines · 43 tokens per session scan C 7fd208cea109

Subscribe to this mod's changes

error-closed-loop is a skill published in the GitHub repository yunsii/wezdeck (4 stars, last pushed 5d ago), licensed MIT. It adds 43 tokens to every session and 912 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.