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

Jiale Liu1,2, 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

Success is stumbling from failure to failure with no loss of enthusiasm.

Winston Churchill

What is failure attribution?

The missing key to self-evolving agents.

When an AI agent fails to finish a task, two questions matter for fixing it: which step went wrong (the when) and which agent or sub-component caused it (the who). Together they pinpoint the decisive error, the earliest action whose correction would have turned a failed trajectory into a successful one.

Automated failure attribution uses LLMs to make this diagnosis without a human in the loop, turning failures into actionable feedback. As agents grow more capable, their failures become subtler and harder to detect, which makes attribution both more difficult and more valuable. A reliable attributor opens the door to self-evolving agentic systems that learn from their own mistakes.

We introduce Who&When Pro, a large-scale benchmark for this task. Our warm-start injection pipeline adds a single error only after exactly replaying a successful prefix, producing 12,326 failed trajectories with golden labels across 3 modalities and 26 source benchmarks.

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}
}