Benchmarking the Residual: What Long-Horizon Evaluations Add Beyond Matched Short-Task Performance

Chao Peng, Zhiheng Lyu, Peijie Dong, Hande Dong, Qiang LinarXiv 2026

TL;DR

When LLM agents fail on long-horizon tasks, is it due to a fundamental "long-horizon" flaw or simply the mathematical reality of error compounding over multiple steps? This position paper introduces the horizon residual, a metric that compares actual end-to-end agent success against a baseline prediction built from short, individual stages. This framework allows researchers to isolate true trajectory-induced degradation (like context rot) from ordinary error compounding.

What Problem Does This Paper Address?

AI agents are increasingly evaluated on complex, multi-step tasks like software engineering (e.g., SWE-bench) and web navigation. Across these benchmarks, a universal trend emerges: the longer the task, the lower the success rate.

However, a low end-to-end success rate is a descriptive deployment result, not a diagnostic explanation. Performance decline can happen for three distinct reasons that current benchmarks frequently conflate:

  1. Error Compounding: The individual steps aren't any harder, but requiring more steps to succeed naturally reduces the overall probability of success.
  2. Harder Local Work: Longer tasks might inherently contain more ambiguous or difficult individual stages.
  3. History Dependence: Performance degrades because the agent gets bogged down by its own accumulated execution history, noisy tool outputs, or state contamination (often called context rot).

Without separating these factors, researchers cannot diagnose why an agent fails. This paper addresses this gap by proposing a rigorous evaluation protocol to isolate and quantify the true impact of the long horizon.

Table 1: Distinct sources of performance degradation as task length increases, together with the control required to distinguish each source.

Methods

The authors propose a diagnostic framework based on a System-Matched Counterfactual:

  1. Decomposition: Break a long-horizon task into a sequence of verifiable, semantic stages (e.g., "find the bug," "change the data model," "update the API").
  2. Checkpoint Evaluation: Run the exact same agent configuration on these individual stages starting from clean, pre-declared checkpoints to estimate the success probability ($q_i$) for each stage.
  3. Product Baseline ($P_{\text{expected}}$): Compute the expected success rate of the full task assuming the stages are independent: $$P_{\text{expected}} = \prod_{i} q_i$$
  4. Horizon Residual ($\Gamma_H$): Calculate the log-ratio between the expected success rate and the actual observed end-to-end success rate ($P_{\text{observed}}$): $$\Gamma_H = \log \left( \frac{P_{\text{expected}}}{P_{\text{observed}}} \right)$$

Interpreting the Residual:

  • $\Gamma_H > 0$: The natural rollout performs worse than the step-by-step baseline, signaling true trajectory-induced degradation or context rot.
  • $\Gamma_H \approx 0$: The performance drop is fully explained by simple error compounding.
  • $\Gamma_H < 0$: The natural rollout outperforms the baseline, suggesting the agent benefits from cross-stage feedback or error recovery.
Figure 1: Agent-configuration-matched comparison between checkpoint-based local evaluation and natural end-to-end execution. Declared checkpoint interventions estimate the conditional stage probabilities used to construct Pexpected, whereas the natural rollout yields Pobserved under accumu- lated history and shared state. The horizon residual ΓH records their protocol-specific log contrast; mechanism claims require additional interventions.

Datasets

As a position paper, this work does not introduce a new dataset. Instead, it audits and meta-analyzes existing long-horizon benchmarks, including SWE-EVO, NL2Repo-Bench, SWE-Chain, ChainSWE, SlopCodeBench, SWE-Marathon, SWE-Milestone, Illusion, and HORIZON. The authors demonstrate that while several of these benchmarks implement pieces of the puzzle (like evaluating independent milestones or manipulating history), none currently execute the full counterfactual protocol required to isolate the horizon residual.

Key Insights and Ideas

  • The "Null Model" of Failure: If an agent has an 80% success rate on four independent sub-tasks, its mathematical probability of completing all four end-to-end is only $0.8^4 \approx 41\%$. A drop from 80% to 41% requires no "long-horizon failure" explanation—it is just basic probability.
  • Task Structure vs. Local Difficulty: The paper advocates for explicitly reporting Work Exposure ($N_{\text{work}}$, the number of verifiable stages) and Dependency Depth ($H_{\text{dep}}$, how deep the chain of dependencies goes). A task can involve a massive amount of work without being deeply sequential.
Table 2: A factorial coding-task design that separates dependency depth from measured local-stage difficulty. Work exposure and local success should be matched within each intended comparison.
  • The Residual is a Compass, Not a Causal Answer: A positive horizon residual proves that the end-to-end rollout underperformed its local potential, but it doesn't pinpoint the exact mechanism. It serves as a disciplined starting point for targeted interventions (e.g., resetting context, compressing history, or modifying state).

Key Results

The paper's primary result is a conceptual framework and a component-level audit of the literature. By reviewing existing evaluations, they highlight stark discrepancies that justify their method:

  • In SWE-Milestone, agents score $\approx 80\%$ or higher when milestones are attempted independently from canonical snapshots, but the best continuous execution score plummets to $38.03\%$.
  • In ChainSWE, average per-bug accuracy falls from $58.9\%$ from an oracle-correct repository state to $36.5\%$ when the agent inherits its own prior modifications.

The horizon residual provides the exact mathematical tool needed to standardize and formally report these types of protocol mismatches.

Limitations and Future Work

  • Decomposition Subjectivity: Defining semantic stages and checkpoints is not unique and depends heavily on human engineering or expert annotation. The authors suggest running sensitivity analyses across multiple reasonable task decompositions to ensure robust conclusions.
  • Domain Restrictions: Replayable checkpoints and automated verifiers are highly mature in coding and terminal environments, but implementing this framework in open-ended, non-deterministic, or physical environments remains an open challenge.
  • Research Agenda: Future work includes developing branching estimators to handle tasks where agents can retry or recover from failures, and mapping out protocol robustness across a wider variety of agent architectures.

Summary updated

BibTeX
@misc{peng2026benchmarking,
  author = {Chao Peng and Zhiheng Lyu and Peijie Dong and Hande Dong and Qiang Lin},
  title = {{Benchmarking the Residual: What Long-Horizon Evaluations Add Beyond Matched Short-Task Performance}},
  year = {2026},
  eprint = {2607.27283},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.27283},
}
Figure