The Agent's Marathon: Probing the Limits of Endurance in Long-Horizon Tasks

Wenhao Zheng, Xinyu Ye, Peng Xia, Fang Wu, Linjie Li, Weitong Zhang, Lijuan Wang, Yejin Choi, Yun Li, Huaxiu YaoOpenReview 2026 · Submission to ICLR 2026 · Rejected

TL;DR

LLM agents are increasingly capable at short-term tasks but tend to "trip" during the long-distance marathon of complex, multi-step reasoning. This paper introduces TaskWeaver, a framework for generating controllable, arbitrarily long reasoning tasks, and LORE, a benchmark that reveals even state-of-the-art models like GPT-5 and o3 collapse when tasks exceed 120 steps—or as few as 15 steps when individual operations become complex.

What Problem Does This Paper Address?

While Large Language Model (LLM) agents have shown promise in scientific discovery and automation, they remain notoriously brittle. In "long-horizon" tasks—those requiring dozens or hundreds of sequential interactions—small errors early on tend to snowball, leading to total system failure.

The authors argue that existing benchmarks fail to measure this "endurance" properly. Manual benchmarks (like GAIA) are too short, usually capping out at 10-20 steps. Tool-use benchmarks focus on the breadth of APIs an agent knows rather than the depth of its logic. Finally, web-based environments are often too messy to provide a "clean" look at an agent's core reasoning ability. We lack a way to precisely dial up the difficulty and length of a task to see exactly where an agent’s logic breaks.

Methods

The authors propose TaskWeaver, a procedural generation framework designed to stress-test agentic endurance.

The core innovation is a Unified Tool Interaction Abstraction. Instead of making agents learn complex, heterogeneous APIs, TaskWeaver treats every tool call as a simple "file-read" operation. By stripping away the "noise" of API syntax, the researchers can isolate the "signal": the agent's ability to track state, integrate intermediate results, and maintain a plan over long sequences.

TaskWeaver builds Dependency Trees using two modes:

  • Bottom-Up: Starting with evidence (leaf nodes) and building toward a conclusion (root).
  • Top-Down: Starting with a goal and decomposing it into sub-goals.

To prevent the tasks from becoming too "wide" (simple parallel tasks), they use a Leaf Consolidation mechanism. This forces the generator to create deeper, more nested chains of logic, effectively lengthening the "marathon" the agent must run.

Datasets

The authors introduce LORE (Long-horizon Reasoning Evaluation), which instantiates TaskWeaver across three distinct domains:

  1. Document Understanding Navigation: Agents navigate a web of interconnected documents, performing arithmetic or string operations to find the ID of the next document.
  2. Multi-modal Understanding: Agents must count objects in images or interpret rendered formulas to progress through the reasoning chain.
  3. Executable Code Reasoning: Agents trace function calls and conditional logic across multiple files, including "Hard" variants involving asynchronous code and race conditions.

They evaluate four top-tier models: GPT-4o, GPT-5, o1, and o3.

Key Insights and Ideas

  • The Reasoning "Wall": There is a clear performance ceiling. Even for the strongest models, accuracy approaches zero once a task exceeds 120 steps.
  • Complexity Shrinks the Horizon: Reasoning ability is relative. On "Standard" tasks, models might last 100 steps. On "Hard" tasks (e.g., distorted images or concurrent code), the operational horizon of even the best model shrinks to just ~12 steps.
  • Three Primary Failure Modes:
    • Premature Halting: Agents often give up and claim a task is "unsolvable" because they fail to realize they already have the information needed to take the next step.
  • Ineffective Working Memory: When faced with a large batch of new leads, agents often "forget" earlier leads, causing them to lose the thread of the long-term plan.
  • Reasoning Degradation: Even if an agent collects all the right data, it often fails to synthesize it correctly if the relevant facts are scattered across a very long, noisy context window.

Key Results

  • Model Hierarchy: A consistent performance gap emerged: GPT-5 > o3 > o1 > GPT-4o. This suggests that improvements in base reasoning models translate directly to better agentic endurance.
  • The 120-Step Collapse: In the Document Understanding domain, GPT-5’s accuracy falls below 20% at roughly 120 operations.
  • The "Hard" Variant Crash: On LORE-Hard, performance for all models collapses almost immediately. Even the most advanced models converge toward the performance of the weakest models once the per-step complexity exceeds a certain threshold.

Limitations and Future Work

The authors acknowledge that while TaskWeaver provides a highly controllable environment, the tasks are synthetic. While this is a feature for measurement, real-world tasks often involve more "emergent" complexity that synthetic rules might not fully capture.

Future Work suggested by the paper includes:

  • Developing dedicated long-term memory modules to prevent information loss.
  • Exploring sub-agent architectures that allow discrete sub-tasks to be offloaded to specialized agents with "clean" context windows.
  • Improving self-monitoring so agents can better assess their own knowledge state before halting prematurely.

Summary updated

BibTeX
@misc{zheng2026agent,
  author = {Wenhao Zheng and Xinyu Ye and Peng Xia and Fang Wu and Linjie Li and Weitong Zhang and Lijuan Wang and Yejin Choi and Yun Li and Huaxiu Yao},
  title = {{The Agent's Marathon: Probing the Limits of Endurance in Long-Horizon Tasks}},
  year = {2026},
  url = {https://openreview.net/forum?id=dAn82lpLx4},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}
Figure