hive.error-recovery

Diagnose tool call failures and apply a structured retry-or-escalate decision tree.

11.0k|5.7k|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/aden-hive/hive --skill hive-error-recovery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hive.error-recovery
Source: https://github.com/aden-hive/hive/tree/main/core/framework/skills/_default_skills/error-recovery
Command: npx skills add https://github.com/aden-hive/hive --skill hive-error-recovery

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When tool calls fail inside an agent run, agents often either retry blindly or silently drop the failed item, corrupting task queues and losing work. This Skill gives worker agents a deterministic recovery protocol so every failure is classified, handled, and recorded.

Core Features & Use Cases

  • Failure Classification: Distinguishes transient failures (network blips, rate limits, timeouts) from structural ones (wrong selectors, missing auth, invalid schemas, permission errors) and applies the correct response to each.
  • Bounded Retries with Adaptation: Retries transient errors once, fixes and retries fixable structural errors, and abandons a tool after repeated consecutive failures in favor of an alternative approach.
  • Durable Failure Recording: Writes failed task status and a one-sentence reason directly into the colony SQLite task queue instead of volatile in-memory buffers, so crashes never lose failure state.
  • Use Case: A worker agent scraping a queue of URLs hits repeated 403 responses; instead of looping forever, it classifies the failure as structural, records the task as failed in the tasks table with the reason, and moves to the next queue item.

Quick Start

When a tool call fails during your worker run, follow the error-recovery decision tree to classify the failure, retry or record it in the tasks table, and continue with the next queue item.

Frequently Asked Questions about hive.error-recovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle tool call failures in an AI agent workflow?

Classify each failure as transient or structural first. Retry transient errors once, fix and retry fixable structural errors, and record unfixable failures before moving on. Never silently drop a failed item.

How to retry failed tasks without infinite loops?

Bound retries with a per-tool failure counter. After the configured maximum consecutive failures for one tool, stop using it and switch to an alternative approach instead of retrying indefinitely.

What is the difference between transient and structural tool errors?

Transient errors are temporary conditions like network blips, rate limits, and timeouts that a single retry can resolve. Structural errors like wrong selectors, missing auth, invalid schemas, or permission denials require changing the input or abandoning the call.

How do I record failed tasks in SQLite from an agent?

Run an UPDATE statement against the tasks table setting status to failed, last_error to a one-sentence reason, and completed_at and updated_at timestamps, scoped by task id and worker id. Crash-level retries are handled separately by the retry_count column and stale-claim reclaimer.

When should an agent escalate instead of retrying a failure?

Escalate when a failure blocks all forward progress and cannot be fixed by adjusting inputs. Record the failure state first so the escalation carries full context about what was attempted.