Error Recovery Retry

Design robust error recovery, retry logic, and fallback strategies for production AI agents. Covers transient failure handling, circuit breakers, exponential backoff, state recovery, graceful degradation, and dead-letter queues for agent systems.

492 stars 68 forksAI, LLMs & Agents

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add cosmicstack-labs/mercury-agent-skills --skill error-recovery-retry
Manual install
git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/ai-ml/error-recovery-retry ~/.claude/skills/error-recovery-retry

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Error Recovery & Retry Logic for Agents

## Overview

Agents fail. APIs time out. Models return garbage. Tools throw exceptions. The difference between a production-grade system and a prototype is how gracefully it fails. This skill covers comprehensive error recovery patterns — from simple retries to circuit breakers, stateful recovery, and human escalation paths.

---

## Core Concepts

### Failure Taxonomy

| Failure Type | Example | Frequency | Recoverable? |
|-------------|---------|-----------|-------------|
| **Transient** | API timeout, network glitch | Common | ✅ Yes — retry |
| **Rate Limited** | 429 Too Many Requests | Common | ✅ Yes — backoff |
| **Validation** | Invalid tool parameters | Occasional | ✅ Yes — fix and retry |
| **Model Error** | LLM returns nonsense | Occasional | ⚠️ Maybe — retry with different prompt |
| **Context Overflow** | Token limit exceeded | Rare | ✅ Yes — compress and retry |
| **Permission** | Agent lacks access | Rare | ❌ No — escalate |
| **Security** | Injection attempt detected | Rare | ❌ No — alert and block |
| **Permanent** | Tool deleted, endpoint gone | Rare | ❌ No — escalate to human |

### Recovery Strategy Decision Tree
Read the full skill on GitHub

Details

Skill name
error-recovery-retry
Path
categories/ai-ml/error-recovery-retry/SKILL.md
License
MIT
Repo updated
25 August 2026

FAQ

What does the Error Recovery Retry skill do?

Design robust error recovery, retry logic, and fallback strategies for production AI agents. Covers transient failure handling, circuit breakers, exponential backoff, state recovery, graceful degradation, and dead-letter queues for agent systems.

How do I install the Error Recovery Retry skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill error-recovery-retry. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Error Recovery Retry popular?

It lives in cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.

Related skills

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.