Manuscript Offprint

arXiv:2610.17633

Executable Prefix Values for Locating Agent Failures

Bingyu Shen, Jiaqi Tang, Lan Wei, Yi Sheng, J. Jenny Li, Boyang Li

Abstract

Work on debugging LLM agents treats the “first mistake” marked by a human or LLM judge as ground truth for where a trajectory failed. We ask whether such labels point at causes or symptoms, and make the distinction executable: we restart the agent from reconstructed intermediate states of a failed trajectory and estimate its prefix value V(ht)V(h_t), the probability of success from each step, with a certified point of no return (PNR) for a failure. On 150 SWE-bench Verified tasks with two frozen open-weight agents, we build such curves for 47 and 60 failed trajectories and probe every step labeled by four frontier judges under the Traverse rubric. We found that the labels did not accurately indicate what a controller needs. Judges of different lineages agree on the exact step in only 21/57 cases, and the newest judges flag mistakes in 8/10 and 10/10 successful runs. For 66% of the labels, the agent’s success probability does not drop at the labeled step; only 7/188 answers name the decisive step. Restarting at the measured restart point raises expected success from 0.44 to 0.57 offline, and real restarts confirm the advantage, whereas restarting at a judge’s label does not (-0.08 to -0.03). We release our code, curves, and labels. 1^{1}

1 Introduction

When a long-horizon agent fails, where did it go wrong? The question has two kinds of answer. A symptom is where the failure becomes visible: the traceback, the failing test, the fix that does not apply. A cause is the earlier step that made the symptom inevitable (but not visible yet): a wrong diagnosis adopted, a file misread, a hypothesis committed to. Debugging, restarting and learning from failures all depend on finding the cause: a controller that restarts at the symptom restarts too late, and a verifier trained on symptoms recognizes failure after the fact.

Corresponding author.

1^{1}codebase: https://anonymous.4open.science/r/laf27/

A coding agent fails a task read edit test first traceback

reads a file and adopts the wrong idea

failed

Today: a judge reads the transcript

"The first mistake is here."

a symptom: by then the task was already lost

This paper: restart the agent from each step

Figure

Figure 1: Symptom or cause? A coding agent fails a task (top; one square per step). A judge that reads the transcript points at the first visible mistake, typically the first traceback (middle), but by then the task was already lost. We restart the agent from every step of its own run and watch its chance of success (bottom): it collapses at the step where the agent adopted the wrong idea, which is the cause. Figure 2 shows measured curves.

Current practice locates the first mistake by judgment: a human annotator or an LLM judge reads the trajectory and marks the earliest erroneous step (Rahman et al., 2026; Zhu et al., 2025; Zhang et al., 2025, 2026); benchmarks are built from such labels, verifiers are trained to reproduce them, and localizers are ranked by agreement with them. A label is a judgment about a text, made in hindsight, with no access to what the agent would have done had it continued. Nothing in the rubric distinguishes the step where the evidence appears from the step where the task was lost, and which one labels land on has not been measured: there was nothing to measure them against.

We make the distinction executable. For a stochastic agent π\pi the prefix value V(ht)V(h_t) is the probability that the agent succeeds if it continues from history hth_{t} with the remaining budget. A failed run starts at V(h0)=p(x)V(h_{0}) = p(x), the task's pass rate, and ends at V(hT)=0V(h_{T}) = 0 (Figure 1); the cause is where VV drops, by the standard of the agent's own average behaviour, and the symptom is whatever appears after. VV can be estimated by restarting the agent from reconstructed intermediate states of its real trajectory, repeatedly, and evaluating the outcomes with the task's own tests; we call the result a V-curve. The same quantity is what inference-time controllers need (Dahal et al., 2026; Wang et al., 2026): a run should be restarted when a fresh start with the remaining budget, R(x,B−t)R(x, B - t), is worth more than continuing, V(ht)V(h_{t}).

We build V-curves for failed trajectories of two frozen open-weight agents on SWE-bench Verified (Jimenez et al., 2024; OpenAI, 2024), with an adaptive schedule, a certified point of no return and controls for sampling noise and the shrinking budget, and place the first-mistake labels of four frontier judges on them. We ask: RQ1 where do labels fall relative to the drop in V, and does V move at all where a judge points? RQ2 how are failures distributed between cliffs and erosion, and what is the decisive step? RQ3 what does a restart policy gain from the measured signal, from a judge's label, or from a fixed rule, and how cheaply can the signal be obtained?

Our contributions: (i) a formulation of failure localization and of the restart decision in terms of the agent's own success probability, with graded responsibility shares and a certified point of no return ( §3§3); (ii) a method that measures it on real SWE-bench trajectories, with its controls, replay checks and cost ( §4§4, §6.6§6.6); (iii) an offline and an online evaluation of restart policies ( §6.5§6.5); (iv) measurements of frontier judges against the executable signal on two agents ( §6.2–6.4§6.2–6.4, §6.9§6.9). The labels turn out to be neither causes nor consistently symptoms: they scatter around the decisive drop, and for 66% of the labels the agent's success probability does not move at the labeled step at all. What a controller needs, and what the labels do not carry, is the point at which the agent's own prospects collapse; the curves give it.