Auditing failed agent executions requires identifying the responsible actor, the earliest decisive step, and the error mode. Representative supervised methods either focus on step localization or predict multiple attribution targets from shared trajectory representations. These methods do not use the localization result to select the text for mode diagnosis. To address this limitation, we propose RecordRoute, which couples comparative localization with local diagnosis. Specifically, it represents each record with word and character features and learns to rank records through comparisons within each trajectory. The selected record supplies the actor and step, while its text and metadata drive mode prediction. On controlled-injection Who&When Pro, RecordRoute outperforms StepFinder and ASCon on all four official metrics. With actor and step predictions fixed, local diagnosis reaches 77.47% pooled joint accuracy versus 69.28% for full-trace diagnosis. On natural failures from TraceElephant and CatchBench POST, it outperforms these baselines and three open LLMs in localization.
Figures & tables
Figure 1: Overview of RecordRoute. (a) An error propagates across agents. (b) RecordRoute locates the actor and step, then diagnoses the error mode from the selected record.
Figure 2: Overview of RecordRoute. (a) Record features combine word and character TF-IDF with query overlap. Headers are retained for output. (b) Logistic regression learns from record pairs within a trajectory. At inference, the learned weights score records individually. (c) The selected record supplies actor and step from its retained header, and a linear SVM predicts the mode from its text and metadata. In the diagram, T is the record count and si is the score ρi .
Who&When Pro
TraceElephant
CatchBench POST
Method
Who
When
What
All
Step
Top-1
Top-3
MRR
Random
41.04
31.11
27.63
17.77
8.72
11.90
34.60
0.324
BM25
49.59
38.05
25.53
20.26
7.80
12.70
65.87
0.420
First-step
56.97
34.83
13.43
12.18
5.50
15.87
51.59
0.407
Middle-step
36.06
24.96
18.31
11.44
8.72
7.94
42.06
0.330
Last-step
31.68
29.09
31.63
24.83
2.29
0.79
18.25
0.225
Table 1: Main results on three benchmarks. Scores are percentages except MRR. All three open LLMs cover the full evaluation sets without benchmark training labels. Prompt and decoding settings appear in Appendix B.1 .
Figure 3: Exact-step accuracy on unseen (a) task benchmarks and (b) agent frameworks. Pooled weights trajectories equally, while macro weights benchmarks or frameworks equally.
(a) Who&When Pro
Pointwise
Pairwise
Representation
Step
Joint
Step
Joint
Qwen3 (128d)
61.36
52.76
65.10
56.10
Qwen3 (1024d)
69.63
60.32
72.69
62.92
Word and character TF-IDF
86.73
74.06
90.41
77.13
Table 2: Record representations and ranking objectives. Accuracies are percentages, pooled across trajectories for Who&When Pro.
Variant
Mode
Joint
RecordRoute
78.87
77.47
Without record text
45.58
44.38
Full-trace diagnosis
Concatenation
71.02
69.28
Mean pooling
46.84
43.92
Max pooling
55.17
52.63
Table 3: Diagnosis ablations with the locator fixed. Mode and Joint are pooled accuracies (%).
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Pipeline
Input
Device
ms/inc.
RAM (GiB)
State (MiB)
VRAM (GiB)
RecordRoute
raw text
CPU
9.32
1.66
12.75
0.00
StepFinder
cached features
GPU
2.21
1.81
11.48
0.04
StepFinder
raw text
GPU
66.61
1.92
1137.41
5.08
Appendix
Table 4: Median inference time and peak memory. Raw StepFinder input includes embedding computation.
Claude Sonnet 5.5
DeepSeek V4.1 Flash
Method
Actor
Step
Mode
Joint
Actor
Step
Mode
Joint
LLM only
74.22
67.19
27.34
19.53
75.00
66.41
31.25
20.31
BM25 + local diagnosis
60.94
41.41
21.09
10.94
60.94
41.41
23.44
8.59
RecordRoute + full trace
91.41
87.50
34.38
32.81
91.41
87.50
35.16
30.47
RecordRoute + local diagnosis
91.41
87.50
44.53
41.41
91.41
87.50
39.06
36.72
Appendix
Table 5: Pooled attribution accuracy (%) on 128 Who&When Pro cases.
Table 9
(a) Localization
Input
All
SmolAgents
Others
Original
90.86
92.61
88.93
Canonical code markup
91.24
93.07
89.23
Masked, no query
86.75
89.74
83.46
Last-step
49.38
–
–
Appendix
Table 8: Who&When Pro accuracy (%) under changes to record text. (a) Exact-step localization. (b) Diagnosis with actor and step predictions fixed.
AI agents often fail in ways that are difficult to localize because executions are probabilistic, long-horizon, multi-agent, and mediated by noisy tool outputs. We address this gap by manually annotating failed agent runs and release a novel benchmark of 170 trajectories across 11 diverse task settings, including structured API workflows, incident management, and open-ended web/file tasks. Each trajectory is annotated with a critical failure step and a category from a grounded-theory derived, cross-domain failure taxonomy. To mitigate the human cost of failure attribution, we present AgentRx, an automated diagnostic framework that pinpoints the critical failure step in a failed agent trajectory. It synthesizes constraints, evaluates them step-by-step, and produces an auditable validation log of constraint violations with associated evidence; an LLM-based judge uses this log to localize the critical step and category. AgentRx improves step localization by 75% on average over prior work, while providing failure category attribution.
Errors in LLM agent executions and their visible consequences can be separated by many steps, making decisive-error localization a matter of understanding both step content and step dependencies. We introduce DeFA, a dependency-guided framework for agent failure attribution. DeFA first combines protocol relations and semantic dependencies into an event dependency graph spanning the trajectory. It then identifies events that may violate task requirements and traces their sources and subsequent effects to construct a failure propagation graph. Finally, DeFA uses step evidence and the steps' roles in failure propagation to identify the decisive error, responsible agent, and error category. To support long trajectories, DeFA partitions executions into segments and combines the current segment's detailed content with summaries of the other segments, giving local diagnosis access to global execution context. Across Who and When and the Who and When Pro text subset, DeFA achieves the highest responsible-agent and exact step accuracy with all evaluated backbones, and the highest failure-mode accuracy among taxonomy-aligned methods on Pro. Further experiments on image and video trajectories demonstrate its applicability to multimodal failure attribution. Ablations support the contributions of segmentation, the event dependency graph, and the failure propagation graph. Using DeFA's diagnostic feedback for skill evolution in Trace2Skill improves downstream task accuracy by 6-15 percentage points over the native pipeline, showing that the diagnoses can also support agent improvement on subsequent tasks.
Bo Deng, Xinlei Zheng, Yi Wei +6
Qwen DianJin Team, Alibaba Cloud Computing · Beihang University
Large language model (LLM) agents now solve complex tasks through long plan-and-execution traces, yet the ability to locate errors in a completed traces still lags far behind, especially in the silent failure regime. Existing approaches predict suspect steps via classifiers or LLM judges, or recover correct answers via retry, but none feed the intervention outcome back to refine the attribution itself. We propose \methodname, a method that closes this gap by diagnosing a candidate error step, testing it through controlled replay with a diagnosis-specific patch, and using the verified outcome flip as contrastive evidence to refine the final attribution. Across four localization benchmarks spanning multi-hop reasoning across domains, \methodname achieves the highest localization accuracy among same-auditor methods across all four benchmarks, with the largest gains on structured tool-use traces, while providing actionable localization even when ground-truth answers are unavailable.
Xiaofeng Lin, Yingxu Wang, Tung Sum Thomas Kwok +4
University of California, Los Angeles, USA · Cisco, USA · University of Mississippi, USA