hive.error-recovery
Agent skill fromaden-hive/hive
Follow a structured recovery decision tree when tool calls fail instead of blindly retrying or giving up.
How to install hive.error-recovery
install hive.error-recovery
# install the hive pack with the skills CLI
npx skills add aden-hive/hive# or add only this skill to Claude Code: copy the folder
core/framework/skills/_default_skills/error-recovery/
# into
~/.claude/skills/error-recovery/ (all projects)
.claude/skills/error-recovery/ (one project)
1## Operational Protocol: Error Recovery23When a tool call fails:451. **Diagnose** — classify the failure as *transient* (network blip, rate limit, timeout) or *structural* (wrong selector, missing auth, invalid schema, permission denied).672. **Decide:**8 - Transient → retry once.9 - Structural + fixable → fix the input and retry.10 - Structural + unfixable → record the failure and move to the next item.11 - Blocking all progress → escalate.12133. **Adapt** — if the same tool has failed {{max_retries_per_tool}}+ times in a row, stop using it and find an alternative approach.1415**Never silently drop a failed item.** If the item is a task in the colony queue, write the failure to the DB instead of an in-memory buffer:1617```bash18sqlite3 "$DB_PATH" "UPDATE tasks SET status='failed', last_error='<one-sentence reason>', completed_at=datetime('now'), updated_at=datetime('now') WHERE id='<task-id>' AND worker_id='<your-worker-id>';"19```2021The `tasks.retry_count` column and the stale-claim reclaimer handle auto-retry for crashes; your job is the within-run decision tree above. See `hive.colony-progress-tracker` for the full queue protocol.
Excerpt shown under the repository's Apache-2.0 license.
