agentleFS
apinizerapinizer/agentnizer-cookbook/.claude/skills/recovery/SKILL.md

recovery

Skill2 starsChanged 4 months agoMITView on GitHub

Inspect recovery emergency mode (when team.paused fires due to circuit breaker). Approve resume after investigation.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. celestiaorg/celestia-app★ 421same name
    2. jorekai/skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

Files
SKILL.md

/recovery — Recovery emergency mode

The daemon has a circuit breaker: if LSD_FAILURE_RATE_PAUSE_HOURLY (an integer count of failed tasks in the last hour, read from completed.jsonl; default 0 = disabled) is reached, the daemon writes .state/locks/team.paused and emits a Slack alert. This skill inspects the paused state and helps you resume after investigating — it does not auto-clear anything.

Separately, if the operator has set LSD_RECOVERY_EMERGENCY_MODE=1, the daemon layers an emergency signal on top of an already-paused state: once team.paused exists, if the last-hour failure rate (over ≥5 completed tasks) is at or above LSD_FAILURE_RATE_RECOVERY_THRESHOLD (default 0.6) — or the daily hard cost cap was hit — the daemon writes .state/recovery_emergency.flag plus a Slack alert, subject to a LSD_TUNER_EMERGENCY_COOLDOWN_SEC cooldown (default 3600s). This is a signal only: the daemon does not spawn the tuner itself; an external trigger (cron/CLI) is expected to invoke it in emergency mode (LSD_TUNER_EMERGENCY_MODEL, default sonnet). LSD_RECOVERY_EMERGENCY_MODE defaults to off, so most setups never see this second layer.

Usage

/recovery                  # status: is team.paused set? is the emergency flag present?

What it shows

  • .state/locks/team.paused — presence means the daemon is paused (circuit breaker or a manual team.sh pause).
  • .state/recovery_emergency.flag (only relevant when LSD_RECOVERY_EMERGENCY_MODE=1) — a JSON marker (trigger_iso, reason, model) recorded when the failure rate stayed high after the pause; informational, not itself actionable by the daemon.
  • .state/recovery_last_trigger.json — cooldown bookkeeping for the emergency signal (last_trigger_ts, count).
  • Recent completed.jsonl entries — the failed-task pattern that likely tripped the breaker; cross-reference with /logs and /decisions.

Resume flow

There is no daemon-watched "approved" marker file. Resuming is a plain manual step:

team.sh resume

This removes .state/locks/team.paused; the daemon's dispatch loop resumes spawning on its next poll. The daemon does not auto-clear the breaker on its own, with one exception: when the pause reason is the daily hard-cost-cap (not the failure-rate breaker), the pause flag is auto-dropped on UTC day-rollover (see pipeline-workflow.md T25). Pauses reasoned circuit_breaker_failure_rate or user_initiated always need a human to clear them.

Investigate first (/logs, /decisions, /lessons), then run team.sh resume.

When the breaker fires

  • LSD_FAILURE_RATE_PAUSE_HOURLY=N (default 0, disabled) — N or more tasks failed in the last hour, per completed.jsonl.
  • A spike of timeouts on the same agent (e.g. a provider rate-limit cascade) typically shows up as repeated failures inside that same window.
  • Repeated terminal_fail verdicts on the same module within the hourly window.

Notes

/recovery is read-only inspection; clearing the pause is always the operator's explicit act via team.sh resume. This is intentional: a circuit breaker that auto-resets hides the problem.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.