← ClaudeAtlas

error-recoverylisted

Strategies for handling subagent failures with retry logic and escalation patterns.
aiskillstore/marketplace · ★ 329 · AI & Automation · score 82
Install: claude install-skill aiskillstore/marketplace
# Error Recovery Skill Pattern for handling subagent failures gracefully with appropriate retry strategies. ## When to Load This Skill - You are spawning subagents that may fail - A subagent returned an error or unexpected output - You need to decide whether to retry, escalate, or abort ## Failure Categories | Category | Symptoms | Strategy | |----------|----------|----------| | **Transient** | Timeout, malformed output, parsing error | Simple Retry | | **Context Gap** | "I don't have enough information", unclear task | Context Enhancement | | **Complexity** | Partial completion, scope creep, tangents | Scope Reduction | | **Boundary/Contract** | `status: blocked`, boundary_violation, contract_change | Escalation | | **Fatal** | Repeated failures (3+), fundamental misunderstanding | Abort with Report | ## Retry Strategies ### Strategy 1: Simple Retry For transient failures. Same prompt, up to 3 attempts. ``` # Track attempts attempts: 0 max_attempts: 3 # On failure IF attempts < max_attempts: attempts += 1 Task(same_subagent_type, same_model, same_prompt) ELSE: Mark as FAILED, move on ``` **Use when:** - Output was malformed or truncated - Timeout occurred - Agent returned empty/null response ### Strategy 2: Context Enhancement Add more information to help the agent succeed. ``` Task( subagent_type: "implementer", model: "sonnet", prompt: | ## PREVIOUS ATTEMPT FAILED Error: {error_message} Output received: {partial_output} ## ADDITI