Skip to content

Error Recovery Decision Tree

Makes the agent diagnose failed tool calls and choose retry, fix, skip, or escalate instead of blind retries

Repository
aden-hive/hive
Stars
11,132
Licence
Apache-2.0
Files
1 file

What it does

When a tool call fails, this skill tells the agent to first classify the failure as temporary (like a network blip, rate limit, or timeout) or structural (like a wrong selector, missing login, bad input, or denied permission). Temporary failures get one retry, fixable structural problems get the input corrected and retried, and unfixable ones are recorded and skipped, with escalation if they block all progress. It also stops the agent from repeatedly using a tool that keeps failing, and from silently dropping failed queue tasks by writing the failure to a database.

Great for

  • Developers building long-running agent workflows in the Hive framework who want predictable behaviour when tools fail
  • Teams running agents against task queues where failed items must be recorded rather than lost
  • People who find agents either retrying endlessly or giving up too early on tool errors

Skip it if

  • Simple one-off chats or tasks without tools, where the decision tree adds nothing
  • Environments outside the Hive colony/task database, since the SQL update step assumes a tasks table with specific columns and a $DB_PATH variable; the agent would need to adapt or skip that step
  • Situations where a failure must be handled by a human with full context, because the skill pushes the agent to decide and move on, which could hide problems if escalation is not configured

Try asking

  • “Keep working through my batch of 50 scraping tasks, and if one fails for a permanent reason, record it and move on”
  • “The API keeps returning rate limit errors, so stop calling it and find another way to get this data”
  • “Retry this tool call once if it looks like a network timeout, but fix the input if the schema was wrong”
  • “Mark the current queue task as failed with a short reason if you cannot complete it”
Step-by-step guide: how to use Error Recovery Decision TreeInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.

    error-recovery.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip error-recovery.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip error-recovery.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Only the queue-task step runs a shell command (sqlite3); the decision logic itself is guidance for the model, so review the database path and worker ID before running in production
  • Set the max retries per tool value (the template variable max_retries_per_tool) deliberately, since it controls when the agent gives up on a tool
  • Install hive.colony-progress-tracker alongside this skill, because the SQL step points to it for the complete queue protocol

What's inside

  • SKILL.md

Redistributed unmodified from aden-hive/hive under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.

Find exactly what
you're looking for