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

Jiale Liu1,2open to work!, Huajun Xi3, Shaokun Zhang1, Yifan Zeng4, Tianwei Yue5, Chi Wang2, Jian Kang3, Qingyun Wu1,2, Huazheng Wang2,4

1Penn State University 2AG2ai, Inc. 3Mohamed bin Zayed University of Artificial Intelligence 4Oregon State University 5Mathos AI

What is failure attribution?

Locating the decisive error in a failed agent trajectory.

When an agentic system fails a task, diagnosing the failure comes down to two questions: which agent or component was responsible (the who) and at which step the error occurred (the when). Together, they identify the decisive error: the earliest action whose correction would have turned the failed trajectory into a successful one.

Automated failure attribution answers these questions with LLMs instead of manual inspection of long execution logs. As agents become more capable, their failures grow subtler and their trajectories longer, making attribution both harder and more valuable. Reliable attribution turns failures into targeted feedback for debugging and improving agentic systems.

We introduce Who&When Pro, a large-scale benchmark for this task. Our warm-start injection pipeline exactly replays a successful prefix and then injects a single error, yielding 12,326 failed trajectories, each labeled with its responsible agent and decisive step. The traces are drawn from 26 source benchmarks in 9 task categories, from coding, STEM, data science, deep search, and embodied tasks to GUI navigation, multimodal search, image QA, and video QA. They are produced by 15 agent frameworks and span 3 modalities (text, image, and video).

Dataset Illustration

A snapshot of what's inside the benchmark.

0
Failure traces
0
Task categories
0
Source benchmarks
0
Agent frameworks
Sunburst overview: 26 source benchmarks grouped into 9 categories across 3 modalities, with 4 corner panels showing failure attribution examples.
Inner ring groups 26 source benchmarks into 9 task categories; outer ring maps each to its modality (text, image, video). The four corner panels show illustrative failure attribution examples; the decisive step is highlighted.

Data Generation Pipeline

1

Roll out

Run agents on 26 benchmarks across nine task families, recording both successful trajectories and the failures that arise naturally.

2

Build taxonomy

Distill the natural failures into 18 error modes spanning planning, tool use, perception, memory, and coordination.

3

Inject failures

Turn successful runs into 12,326 labeled traces with warm-start injection, explained below.

Warm-start injection is how we keep the labels exact. We take a run that already succeeded and replay it one step at a time, rebuilding the agent's memory and tools, up to a single chosen step. There we swap in one mistake, then hand control back and let the agent finish on its own. Every step before the mistake matches the successful run, so that one swapped step is provably the first thing that went wrong. The which step and which agent labels are then exact by construction, not estimated after the fact.

matches seed drifted from seed injected error downstream failure
Prior

Re-rollout from scratch

Seed run
\(a_1\)\(a_2\)\(a_3\)\(a_4\)\(a_5\) success
Fresh re-run, inject step 4
\(a_1\)\(b_2\)\(b_3\)\(\tilde{b}_4\)\(b_5'\) failed
Agents are random, so the fresh run already drifts at steps 2 and 3, before any injection. Did step 4 cause the failure, or the earlier drift? The decisive step is ambiguous.
Ours

Warm start, then run

Seed run
\(a_1\)\(a_2\)\(a_3\)\(a_4\)\(a_5\) success
Replay exactly, inject step 4
\(a_1\)\(a_2\)\(a_3\)\(\tilde{a}_4\)\(a_5'\) failed
Every step before the injection matches the successful run, so \(\tilde{a}_4\) is the only change. Step 4 is provably the decisive error.

Frontier LLM Results

Model Text Image Video
Agent Step Error Joint Agent Step Error Joint Agent Step Error Joint

All-at-once protocol. Best per column shown bold & tinted, second-best underlined. — = modality not supported by the model. Metrics: Agent = responsible-agent accuracy, Step = decisive-step accuracy, Error = failure-mode macro-F1, Joint = all three correct.

Failure attribution is harder on image and video traces

Models locate the decisive step most accurately on text traces, where the strongest systems are right about 7 in 10 times. Accuracy drops on image traces and drops further on video. A longer trace simply gives the model more to read before it can pinpoint the single step that caused the failure.

Models judge the error type by its symptom, not its cause

Identifying the error type is the weakest skill for every model we tested. A failure that actually starts in planning, verification, or coordination is often labeled a reasoning error. The model responds to the symptom it can see instead of tracing the failure back to the action that caused it.

Failure attribution works best when the model sees the whole trace at once

We compared three ways of showing a trace to the model. The all-at-once setting — the complete trace in a single pass — is the most accurate, beating both a step-by-step pass and a binary-search pass that reveal the trace a piece at a time.

Citation

@misc{whoandwhenpro2026,
  title         = {Who\&When Pro: Can LLMs Really Attribute Failures in AI Agents?},
  author        = {Liu, Jiale and Xi, Huajun and Zhang, Shaokun and Zeng, Yifan and Yue, Tianwei and Wang, Chi and Kang, Jian and Wu, Qingyun and Wang, Huazheng},
  year          = {2026},
  eprint        = {2607.09996},
  archivePrefix = {arXiv},
  primaryClass  = {cs.AI},
  url           = {https://arxiv.org/abs/2607.09996}
}