AgentLongBench: A Controllable Long Benchmark For Long-Contexts Agents via Environment Rollouts

Shicheng Fang, Yuxin Wang, Xiaoran Liu, Jiahao Lu, Chuanyuan Tan, Xinchi Chen, Yining Zheng, Xuanjing Huang, Xipeng QiuarXiv 2026

TL;DR

Current long-context LLM benchmarks rely heavily on static text retrieval, failing to capture how autonomous agents interact with dynamic environments. To bridge this gap, the authors introduce AgentLongBench, a controllable benchmark based on simulated environment rollouts of Lateral Thinking Puzzles that scales up to 4M tokens. Their evaluations reveal a critical bottleneck: while frontier models excel at simple fact retrieval, they struggle significantly with dynamic state tracking and high-density tool logs.

What Problem Does This Paper Address?

Large Language Models (LLMs) are rapidly evolving from passive conversationalists into autonomous agents capable of executing complex workflows, calling external tools, and interacting with environments over long horizons. However, our evaluation frameworks haven't kept pace. Prevalent benchmarks (like "Needle-in-a-Haystack") focus almost exclusively on static reading comprehension—asking a model to find an isolated fact hidden inside a massive wall of concatenated text.

Real-world agent workflows are fundamentally different. They generate dynamic, non-linear trajectories where the context constantly evolves based on the agent's own decisions and iterative feedback loops. Existing benchmarks fail to test an agent's ability to track changing states, parse dense machine-generated tool logs, or reason cleanly without relying on pre-trained parametric knowledge shortcuts.

Methods

The authors propose evaluating long-context agents through simulated environment rollouts based on Lateral Thinking Puzzles. In this setup, an LLM agent acts as an investigator trying to deduce a hidden target item by iteratively querying a deterministic environment oracle and utilizing auxiliary search tools.

Overview of the Data Construction Pipeline for AgentLongBench

To precisely diagnose where agents fail, the benchmark is structured along two orthogonal dimensions:

  1. Knowledge-Intensive vs. Knowledge-Free Settings: The Knowledge-Intensive setting uses real-world entities (Pokémon data), which can trigger the model's internal parametric memory. The Knowledge-Free setting applies fully symbolic masking—mapping names to abstract IDs (e.g., Item_84) and attributes to codes (e.g., Attr_1)—forcing the model to rely purely on in-context logic.
  2. Concise vs. Verbose Response Formats: The Concise format provides pre-filtered intersections across hundreds of interaction turns, testing long-range state tracking and resilience to memory fragmentation. The Verbose format floods the context window with full, unfiltered candidate lists in fewer turns, testing the agent's ability to handle high-density structured noise within a single step.

Additionally, the paper introduces Adequate Context Length (ACL), a metric that quantifies the minimum number of tokens a model must scan and assemble to resolve a specific query, providing a clearer picture of reasoning complexity than total context length alone.

Datasets

The authors introduce the AgentLongBench dataset, which contains interaction trajectories scaling from 32K to 4M tokens, with 800 samples per length. The benchmark comprises 8 distinct tasks evaluated across three core categories:

  • QA in Tool Response: Parsing details and finding duplicates/offsets within structured tool logs.
  • QA in Environment Response: Tracking state changes, counting feedback frequencies, and identifying maximum values from environmental feedback.
  • Final Guess (Intersection): Performing global set operations across the entire history to deduce the final target.

Key Insights and Ideas

  • Parametric Shortcuts Mask Logic Weaknesses: In Knowledge-Intensive settings, models frequently use semantic shortcuts (e.g., guessing a property based on a familiar name). When evaluated on the Knowledge-Free symbolic tasks, performance on complex set operations drops to near zero for almost all models, exposing a severe deficiency in pure symbolic state tracking.
  • The Density vs. Horizon Trade-off: The format of tool outputs reshapes the nature of the challenge. Concise formats bottleneck models via long-horizon memory fragmentation over hundreds of turns. Verbose formats, on the other hand, induce information overload, forcing models to extract minute details from dense, structured text blocks within a single turn.
  • Memory Augmentation Fails Agents: Surprisingly, standard RAG and specialized agentic memory frameworks (like Mem0 and MemoryOS) consistently underperform compared to standalone long-context backbones. Because lateral thinking puzzles require every historical constraint as a strict premise for deduction, the "lossy" compression and vector retrieval typical of RAG systems break the necessary logical chains.

Key Results

  • Frontier Model Discrepancies: Grok-4.1 demonstrated remarkable resilience, maintaining scores above 50.0 even as the context extended to 2M tokens. Conversely, GPT-4.1 and Gemini-2.5-Flash decayed significantly past the 256k token threshold, dropping below 30.0 and 40.0 respectively at 1M tokens.
  • Open-Source Struggles: Open-source models (including the Qwen series and DeepSeek-V3.2) faced steep degradation, with aggregated performance plunging to negligible levels by 1M tokens.
Main Results on Knowledge-Intensive & Concise-Response Setting
  • High-Precision Failures: Tasks requiring strict positional awareness, such as Find Target Offsets, yielded exceptionally poor results across the board. A single hallucinated index or missed entry in a dense machine log completely breaks the logical chain, highlighting a zero-tolerance threshold for retrieval errors in agent workflows.

Limitations and Future Work

The authors note that current RAG and memory mechanisms are fundamentally misaligned with the highly structured, high-density data (like JSON arrays) generated by agent workflows. Standard embedding models and summarizers fail to capture exact logical constraints. The authors suggest that future research must move beyond simple context-window expansion and focus on developing robust, tool-grounded architectures capable of high-ACL evidence localization and strict symbolic state tracking.

Summary updated

BibTeX
@misc{fang2026agentlongbench,
  author = {Shicheng Fang and Yuxin Wang and Xiaoran Liu and Jiahao Lu and Chuanyuan Tan and Xinchi Chen and Yining Zheng and Xuanjing Huang and Xipeng Qiu},
  title = {{AgentLongBench: A Controllable Long Benchmark For Long-Contexts Agents via Environment Rollouts}},
  year = {2026},
  eprint = {2601.20730},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.20730},
}
Figure