Who&When Pro: Can LLMs Really Attribute Failures in AI Agents?

Jiale Liu, Huajun Xi, Shaokun Zhang, Yifan Zeng, Tianwei Yue, Chi Wang, Jian Kang, Qingyun Wu, Huazheng Wang

TL;DR

The authors introduce WHO&WHEN PRO, a massive benchmark of over 12,000 multimodal agent trajectories designed to test whether LLMs can automatically diagnose why, when, and where AI agents fail. By using a clever "warm-start" error-injection pipeline, they establish precise ground-truth labels across text, image, and video tasks, revealing that even frontier models frequently mistake downstream symptoms for root-cause errors.

What Problem Does This Paper Address?

As AI agents become increasingly sophisticated, engineering them becomes a game of whack-a-mole: their failures become subtler, harder to detect, and deeply embedded in long, complex execution traces. If we want agents to autonomously learn from their mistakes (self-evolution), we first need automated systems that can reliably look at a failed trajectory and attribute the failure—identifying which agent messed up, at what step, and why.

Prior benchmarks for this task (known as automated failure attribution) were severely limited: they were small-scale, text-only, and struggled to generate high-quality "golden labels" without expensive human annotation. WHO&WHEN PRO addresses this gap by scaling up failure attribution to multimodal environments (text, image, and video) and providing a rigorous framework to evaluate how well LLMs can act as automated debuggers.

Methods

The core challenge in creating a synthetic failure dataset is ensuring that the labeled "error step" is truly the decisive error that doomed the task. Standard error-injection methods re-run a task from scratch and inject a mistake, but because LLMs are non-deterministic, the new trajectory often drifts before the injection point, muddying the labels.

To solve this, the authors developed a warm-start rollout pipeline:

  1. They collect successful agent trajectories across various benchmarks.
  2. They select an injection step and construct a plausible, on-policy error based on an expert-defined 18-mode failure taxonomy (spanning Perception, Reasoning, Planning, Action, Verification, and Coordination).
  3. Instead of restarting, they exactly replay the successful prefix to restore the environment state, inject the error, and let the agent continue. If the trajectory now fails, it is added to the benchmark.
Figure 2. WHO&WHEN PRO failure-injection pipeline. Agent trajectories collected from benchmarks across text, image, and video modalities are split into successes and failures, with failures used to build an error taxonomy. For each successful seed, an error generator injects a taxonomy-conditioned mistake and a warm-start rollout collects the traces that turned to failure. (Bottom right) (a) Previous methods using re-rollout can cause pre-injection drift, leading to the derived decisive error label approximate; (b) We avoid this problem with warm start-based rollout.

Datasets

WHO&WHEN PRO consists of 12,326 failure traces compiled from 15 agent frameworks evaluated across 26 source benchmarks (including ALFWorld, GPQA, BigCodeBench, ChartQA, OSWorld, and LVBench).

The dataset composition spans:

  • Modalities: 51% Text, 42% Image, 7% Video.
  • Topologies: 76% Single-Agent, 24% Multi-Agent Systems.
Figure 1. Overview of WHO&WHEN PRO. The inner ring groups 26 source benchmarks into 9 task categories. The outer ring maps each benchmark to its modality (text, image, video). Four corner panels illustrate failure attribution examples across modalities and agent topologies. (Top left) a video agent misidentifies a frame. (Top right) a multi-agent coding pipeline adopts a suboptimal architecture. (Bottom left) an image QA agent misreads a chart trend. (Bottom right) a web agent drifts from the user task. The decisive failure step are highlighted in each panel. Trace contents are summarized for illustration purposes and do not reflect the full agent outputs.

Key Insights and Ideas

  • Symptom vs. Root Cause: LLMs struggle to trace errors back to their origin. Planning or verification errors that happen early in a trace often propagate quietly until they cause a visible "blow-up" later. LLMs routinely misclassify these as local reasoning errors because they judge the surface-level symptom rather than tracing the causal chain back to the decisive step.
  • The Modality Trade-off: Modality changes the difficulty profile entirely. Step localization accuracy is highest on text but drops sharply on video due to long, dense context windows. Conversely, failure mode classification improves on video and image traces because visual and behavioral cues provide strong diagnostic signals that text lacks.
  • The Ground-Truth Paradox: Counterintuitively, providing the judge LLM with the task's ground-truth answer can hurt diagnostic performance. While it helps identify perception errors (like bad OCR), it tempts the judge to take shortcuts via outcome verification rather than process verification, causing it to skip over the root cause of reasoning failures.
Figure 4. Analysis of attribution difficulty. (a) Step accuracy drops sharply on video traces while mode classification improves on multimodal traces. (b) Failure mode confusion matrix on multimodal traces, averaged over seven vision-capable models. (c) Step accuracy for four representative models, grouped by trace length in tokens.

Key Results

  • Attribution is Unsolved: Even frontier models struggle significantly. On text, the best models achieve around 73.9% accuracy in localizing the exact error step, but macro-F1 scores for identifying the failure mode plummet to a meager 22.2%.
  • Context Fatigue: Performance is heavily bottlenecked by trajectory length. Step localization accuracy sits at a high 94% for short traces (<3K tokens) but degrades to 50% for long traces (>12K tokens).
  • Open-Weight Competitiveness: Massive closed-source models do not completely dominate. Open-weight models like Qwen3.5-122B and Gemma 4 sit on the Pareto frontier for cost-performance, offering highly practical, localized alternatives for agent debugging pipelines at a fraction of the API cost.

Limitations and Future Work

While the 18-mode taxonomy covers the vast majority of current agent failures, the authors note it is not entirely exhaustive. As AI agents expand into highly collaborative multi-agent setups or complex physical, embodied environments, the taxonomy will need to evolve. Additionally, because the failures are synthetically injected into successful traces, they might exhibit slightly different behavioral distributions compared to organic, human-in-the-loop agent failures.

Summary updated

BibTeX
@inproceedings{liu2026who,
  author = {Jiale Liu and Huajun Xi and Shaokun Zhang and Yifan Zeng and Tianwei Yue and Chi Wang and Jian Kang and Qingyun Wu and Huazheng Wang},
  title = {{Who\&When Pro: Can LLMs Really Attribute Failures in AI Agents?}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=ot6saieu5V},
}
Figure