Taxonomy-Aware Tiered Recovery For Tool Execution Failures In Llm Agents
Abstract
: Large language model (LLM) agents frequently fail when executing external tool calls, yet mainstream recovery uniformly feeds the raw error back for full re-generation, incurring heavy token and latency costs regardless of failure type. We propose ToolRecover, which classifies failures into eight categories via a rule-based pre-filter and a lightweight ModernBERT classifier, then applies cost-calibrated recovery ranging from zero-cost rule fixes to full LLM reflection. Experiments on three agent frameworks (ReAct, AutoGen, CrewAI) and three LLMs (GPT-5.2, Claude Sonnet 4.5, Qwen3-72B-Instruct) show that ToolRecover reduces token consumption by 51.7% and latency by 44.8% versus naive retry while holding a statistically comparable recovery success rate (64.1% vs. 62.4%; McNemar $\boldsymbol{p}=\mathbf{0 . 1 2}$). Ablation studies confirm that both the rule layer and the learned classifier are essential to these gains.