Source-linked AI summary
Where LLM Agents Fail and How They can Learn From Failures
Kunlun Zhu, Zijia Liu, Bingxuan Li, Muxin Tian, Yingxuan Yang, Jiaxun Zhang, Pengrui Han, Qipeng Xie, Fuyang Cui, Weijia Zhang, Xiaoteng Ma, Xiaodong Yu, Gowtham Ramesh, Jialian Wu, Zicheng Liu, Pan Lu, James Zou, Jiaxuan You
TL;DR
LLM agents often suffer cascading failures, and existing analyses lack a systematic way to trace and correct their root causes. The paper introduces a taxonomy, benchmark, and debugging framework; AgentDebug improves error detection and task success across multiple environments.
Problem
Existing agent-failure analyses do not systematically trace errors to root causes or enable agents to correct discovered failures.
Method
The paper introduces AgentErrorTaxonomy, AgentErrorBench, and AgentDebug, which classifies modular failure modes, annotates real trajectories, and supplies corrective feedback.
Results
AgentDebug improves detection accuracy over the strongest baseline and raises task success across ALFWorld, GAIA, and WebShop.
Takeaways & Limitations
The results support principled debugging as a foundation for agents that can recover from failures and evolve toward greater robustness.
Takeaways & Limitations
AgentErrorBench remains limited in scale and domain diversity, and training a dedicated debugging model may be prohibitively expensive in low-resource settings.
Abstract
from arXiv · showhide
Large Language Model (LLM) agents, which integrate planning, memory, reflection, and tool-use modules, have shown promise in solving complex, multi-step tasks. Yet their sophisticated architectures amplify vulnerability to cascading failures, where a single root-cause error propagates through subsequent decisions, leading to task failure. Current systems lack a framework that can comprehensively understand agent error in a modular and systemic way, and therefore fail to detect these errors accordingly. We address this gap with three contributions. First, we introduce the AgentErrorTaxonomy, a modular classification of failure modes spanning memory, reflection, planning, action, and system-level operations. Second, we construct AgentErrorBench, the first dataset of systematically annotated failure trajectories from ALFWorld, GAIA, and WebShop, grounding error analysis in real-world agent rollouts. Third, we propose AgentDebug, a debugging framework that isolates root-cause failures and provides corrective feedback, enabling agents to recover and iteratively improve. Experiments on AgentErrorBench show that AgentDebug achieves 24% higher all-correct accuracy and 17% higher step accuracy compared to the strongest baseline. Beyond detection, the targeted feedback generated by AgentDebug enables LLM agents to iteratively recover from failures, yielding up to 26% relative improvements in task success across ALFWorld, GAIA, and WebShop. These results establish principled debugging as a pathway to more reliable and adaptive LLM agents. The code and data will be available at https://github.com/ulab-uiuc/AgentDebug
1 INTRODUCTION
LLM agents remain vulnerable to cascading errors, while prior analyses do not systematically trace failures to root causes or help agents correct them. This paper introduces a modular taxonomy, benchmark, and debugging framework, with substantial gains in detection and task recovery.
- LLM agents frequently misinterpret instructions, misuse tools, and break down during long-horizon reasoning.
- Prior work largely enumerates error types or presents qualitative cases without tracing failures to root causes or enabling corrective fixes.
- AgentErrorTaxonomy decomposes rollouts into memory, reflection, planning, and action modules to classify failure modes and guide mitigation.
- AgentDebug isolates minimal root-cause failures and provides corrective feedback to responsible states or actions, while AgentErrorBench supplies a standardized debugging testbed.
- 24% higher all-correct accuracy (24.3% vs. 0.3%) and 17% higher step accuracy (45.0% vs. 28.0%) were achieved against the strongest baseline.
- AgentErrorBench contains systematically annotated failures from ALFWorld, GAIA, and WebShop, supporting standardized comparison of debugging methods.
2 WHERE DO LLM AGENTS FAIL?
The paper studies agent failures through a modular taxonomy and a benchmark of annotated trajectories. Its analysis identifies error propagation as a central reliability bottleneck and provides infrastructure for diagnosing failures across modules and steps.
- 2.1 AGENT FAILURE ANALYSIS: Error propagation is the primary reliability bottleneck: early mistakes cascade into later reasoning errors and can derail entire trajectories.
- 2.1 AGENT FAILURE ANALYSIS: AgentErrorTaxonomy organizes recurring failures into memory, reflection, planning, action, and system-level modules.
- 2.2 AGENT ERROR BENCHMARK: AgentErrorBench is a standardized testbed grounded in real-world trajectories for detecting critical errors and generating actionable debugging feedback.
- 2.2 AGENT ERROR BENCHMARK: The benchmark contains 200 trajectories: 100 from ALFWorld, 50 from WebShop, and 50 from GAIA, annotated at the decision-step level by ten expert annotators.
- 2.1 AGENT FAILURE ANALYSIS: Memory and reflection failures include retrieval errors, hallucinations, and progress misjudgments that can lead to flawed planning.
- 2.2 AGENT ERROR BENCHMARK: Failures cluster mostly in mid-trajectory steps 6–15, while action and system errors occur less frequently but remain critical.
3 HOW TO REFINE LLM AGENTS FROM FAILURES?
AgentDebug refines failed LLM-agent trajectories by modeling module-level errors, locating the earliest root-cause failure, and guiding targeted iterative rerollouts.
- The inference procedure comprises fine-grained analysis, critical-error detection, and iterative debugging with targeted feedback.The overview presents these as the three stages used to turn failures into successful trajectories.
- AgentDebug is designed to help single-LLM agents diagnose and recover from failures by correcting root-cause mistakes rather than every surface-level error.The framework aims to reduce noise and focus corrective effort on weaknesses that hinder task completion.
- AgentDebug analyzes each trajectory step across memory, reflection, planning, and action using the AgentErrorTaxonomy.The analysis assigns interpretable error types to produce a structured module-level error profile.
- It identifies the earliest critical error whose correction directly prevents the final failure, distinguishing root causes from superficial or later-corrected mistakes.Counterfactual testing evaluates corrected actions step by step to determine when and why the trajectory goes irreversibly off track.
- After locating the critical error, AgentDebug generates actionable feedback specifying the error type and guidance for refining subsequent actions and plans.The agent rerolls the trajectory under refined feedback when attempts continue to fail.
4 EXPERIMENTS AND RESULTS
Experiments evaluate AgentDebug on annotated failures and downstream tasks across ALFWorld, GAIA, and WebShop. It consistently outperforms strong baselines in error localization and task recovery across diverse agent backbones and environments.
- 4.1 CRITICAL ERROR DETECTION: AgentDebug is evaluated on 200 annotated failure trajectories from ALFWorld, GAIA, and WebShop.The benchmark supports critical-error localization across complementary reasoning and interaction domains.
- 4.1 CRITICAL ERROR DETECTION: The evaluation measures Step accuracy, Step+Module accuracy, and All Correct accuracy for increasingly strict critical-error localization.All Correct requires the exact step, module, and error type.
- 4.1 CRITICAL ERROR DETECTION: 24% higher All-Correct accuracy (24.3% vs. 0.3%) and 61% higher Step accuracy (45.0% vs. 28.0%) are achieved over baselines on average.On GAIA, Step accuracy nearly doubles (58.0% vs. 30.0%) and All-Correct accuracy triples (38.0% vs. 12.0%).
- 4.2 DOWNSTREAM DEBUGGING ON SINGLE-AGENT BENCHMARKS: Baselines are matched to AgentDebug by total token usage, separating targeted error recovery from higher resource allocation.Comparisons include Self-Refine, a Vanilla Debugger, Tree-of-Thought, and Best-of-N.
- 4.2 DOWNSTREAM DEBUGGING ON SINGLE-AGENT BENCHMARKS: On ALFWorld, AgentDebug raises success from 21 to 55 on GPT-4o-mini, from 48 to 74 on Qwen3-8B, and from 60 to 84 on Qwen3-Next-80B.The gains occur across all three backbone models, with especially large relative gains for smaller models.
- 4.2 DOWNSTREAM DEBUGGING ON SINGLE-AGENT BENCHMARKS: AgentDebug yields up to 26% relative improvement in task success across ALFWorld, GAIA, and WebShop.The results support targeted error detection and correction over broader rollout scaling or unguided self-revision.
5 ANALYSIS AND DISCUSSION
The analysis examines how AgentDebug’s design choices affect task success and detection, while showing that early errors can compound into downstream breakdowns. Root-cause correction, additional targeted attempts, and modular rollout strategies are associated with stronger performance.
- Max Number of Attempts Allowed: Additional AgentDebug attempts consistently improve success across GPT-4o-mini, Qwen3-8B, and Qwen3-Next-80B, especially smaller models.The ablation varies the maximum intervention attempts and attributes the gains to targeted re-rollouts.
- AgentDebug Base Models: GPT-4.1 achieves 42% step accuracy and 32% strict all-correct accuracy, substantially outperforming the alternative AgentDebug base models.The compared alternatives include Llama-3.3-70B, GPT-4o-mini, and Qwen3-Next-80B.
- Rollout Strategies: AgentDebug’s Modular rollout achieves the highest Alfworld score, 0.38, outperforming ReAct, Reflection, Act-only, and Memory+ReAct.The comparison uses the zero-shot setting and contrasts reasoning-only and memory-augmented baselines.
- Error Propagation: Early missteps frequently propagate through later steps, with progressively darker shading representing compounding severity and persistence.The outlined cells mark the first critical error in each trajectory.
- Error Propagation: Memory and reflection errors commonly initiate propagation around steps 5–15, after which planning becomes systematically distorted.The passage identifies misremembered facts and misjudged progress as typical early or mid-trajectory sources.
- Implications: Early detection and correction are critical because cascades become difficult to reverse once they begin.The discussion also points to stronger memory retrieval and reflection mechanisms as ways to reduce propagation risk.
6 RELATED WORK
Related work has advanced agent reasoning, tool use, memory, reflection, and failure analysis, but agents remain challenging to evaluate as coherent systems. AgentDebug is positioned as complementary to test-time compute scaling by targeting failures at fixed compute.
- LLM-based Agentic Systems: LLM-agent research combines planning, tool use, persistent memory, and self-reflection to improve complex, multi-step task performance.Examples include ReAct, Tree-of-Thoughts, Graph-of-Thoughts, Toolformer, ToolLLM, and Reflexion.
- Failure Analyses (Single- and Multi-Agent): Failure analyses increasingly quantify breakdowns in single- and multi-agent systems, including coordination collapse, dialogue drift, and planning errors.The cited work examines collaboration, competition, role specialization, and other emergent failure modes.
- Test-Time Scaling for Agents: AgentDebug is presented as orthogonal to test-time scaling because targeted debugging recovers substantial performance even at fixed compute.Test-time scaling instead allocates additional deliberation through search, self-consistency, or related strategies.
7 CONCLUSION
The paper identifies error propagation as a central robustness bottleneck and addresses it through a taxonomy, benchmark, and root-cause debugging framework. It concludes that tracing and correcting failures can support more reliable agents that learn from mistakes.
- Conclusion: The paper identifies error propagation as the central bottleneck to building robust LLM agents.It describes early mistakes cascading into later failures across agent trajectories.
- Conclusion: AgentErrorTaxonomy, AgentErrorBench, and AgentDebug provide principled tools for classifying, evaluating, tracing, and correcting agent failures.Together, these components support systematic failure analysis and targeted debugging.
- Conclusion: Root-cause correction enables substantial performance gains and establishes debugging as a foundation for agents that can continuously learn from mistakes.The conclusion frames this direction as advancing agent reliability and adaptation.
ETHICAL STATEMENT
The study analyzes and improves LLM-agent robustness using publicly available benchmarks without human subjects or sensitive personal data. The authors acknowledge potential misuse and recommend applications respecting safety, fairness, and accountability.
- Ethical Scope: The experiments use publicly available ALFWorld, GAIA, and WebShop benchmarks under their respective licenses.The work does not involve human subjects, sensitive personal data, or directly identifying information.
- Responsible Use: More capable debugging frameworks could be misused to strengthen harmful or malicious agents.The authors therefore encourage responsible use limited to domains respecting safety, fairness, and accountability.
A.1 LIMITATION
AgentErrorBench is limited to three benchmarks and lacks broad domain coverage; multimodal, longer-horizon, and safety-critical settings remain future directions. Training a dedicated debugging model is also costly, so the work uses prompt engineering with existing LLMs instead.
- AgentErrorBench covers only ALFWorld, GAIA, and WebShop, limiting its scale and domain diversity.The authors identify multimodal environments, longer-horizon tasks, and safety-critical applications as important extensions.
- Training a dedicated debugging model would be prohibitively expensive in low-resource academic settings because large-scale human annotation is costly.The authors therefore use a cost-efficient prompt-engineering workflow with existing LLMs, which may underperform a fully trained specialized model.
A.2 AgentErrorTaxonomy
AgentErrorTaxonomy organizes LLM-agent failures across five modules—Planning, Action, Reflection, Memory, and System—and connects error types to annotated trajectories and debugging prompts. The supplied examples illustrate how modular diagnosis identifies root causes and supports corrective guidance.
- Taxonomy structure: AgentErrorTaxonomy organizes agent errors into Planning, Action, Reflection, Memory, and System modules.Representative categories include constraint ignorance and inefficient planning, parameter and format errors, causal misattribution, oversimplification, false memory, and tool or environment errors.
- Debugging workflow: In an ALFWorld example, AgentDebug diagnoses an inefficient cabinet-only search and recommends expanding the search to countertops and tables.The agent then recovers from failure and completes the saltshaker task successfully.
- Debugging workflow: AgentDebug identifies the minimal root-cause failures in a trajectory and returns corrective feedback to the responsible states or actions.Its detector and debugging prompts request structured evidence, reasoning, root cause, and cascading effects.
- Failure examples: The failure examples span memory, planning, action, and reflection errors across WebShop, ALFWorld, and GAIA tasks.Examples include oversimplified memory, ignored constraints, inefficient plans, empty actions, unsuitable tool use, and premature progress judgments.