XAI for Coding Agent Failures: Transforming Raw Execution Traces into Actionable Insights
Organizations: Independent Researcher Islington College (Alumini) Nepal
Abstract
Large Language Model (LLM)-based coding agents show promise in automating software development tasks, yet they frequently fail in ways that are difficult for developers to understand and debug. While general-purpose LLMs like GPT can provide ad-hoc explanations of failures, raw execution traces remain challenging to interpret even for experienced developers. We present a systematic explainable AI (XAI) approach that transforms raw agent execution traces into structured, human-interpretable explanations. Our method consists of three key components: (1) a domain-specific failure taxonomy derived from analyzing real agent failures, (2) an automatic annotation system that classifies failures using defined annotation schema, (3) a hybrid explanation generator that produces visual execution flows, natural language explanations, and actionable recommendations. Through a user study with 20 participants (10 technical, 10 non-technical), we demonstrate that our approach enables users to identify failure root causes 2.8 times faster and propose correct fixes with 73% higher accuracy compared to raw execution traces. Importantly, our structured approach outperforms ad-hoc state of the art models explanations by providing consistent, domain-specific insights with integrated visualizations. Our work establishes a framework for systematic agent failure analysis, addressing the critical need for interpretable AI systems in software development workflows
Figures & tables
| Category | Subcategory | Count |
|---|---|---|
| Planning Failure | Incorrect problem decomposition | 1 |
| Code Generation Failure | Logic errors (wrong implementation) | 2 |
| Testing/Validation Failure | Did not run validation tests | 2 |
| Understanding Failure | Misunderstood problem requirements | 9 |
| Iterative Refinement Failure | Exceeded iteration limit without progress | 18 |
| Metric | Raw | General Purpose LLMs | Our XAI |
| Technical Participants (n=10) | |||
| Time to understand (min) | 8.4±2.1 | 5.2±1.3 | 3.0±0.8 ** |
| Root cause accuracy (%) | 42±15 | 68±12 | 89±8 ** |
| Fix quality (1-5) | 2.6±0.8 | 3.4±0.6 | 4.3±0.5 ** |
| Confidence (1-7) | 3.2±1.1 | 4.8±0.9 | 6.1±0.7 ** |
| Non-Technical Participants (n=10) | |||
Agent Failure Analysis
Agent failure analysis studies how and why AI agents make errors, traces causes through execution, and helps detect or prevent recurrence.
See all 152 papers