Introduction
As autonomous AI agents transition from simple recommendation systems to action-oriented entities capable of executing complex web-based tasks, the ability to maintain long-term memory and reason over extended interaction histories becomes paramount. Personalization requires agents to recall specific user preferences or previous session details—such as a previously viewed hotel or a specific flight preference—to execute current requests accurately.
However, a significant gap exists between the theoretical capacity of Large Language Models (LLMs) to ingest massive context windows (often exceeding 128,000 tokens) and their practical ability to reason over that information to perform multi-step actions. This research, presented at the NeurIPS 2025 Workshop on Language, Agent, and World Models (LAW), investigates this "long-context reasoning" gap in web-based agents.
Methodology: The Long-Context Reasoning Benchmark
To evaluate agent performance across long interaction histories, the authors developed a novel framework that simulates multi-session user activity. The core of this approach involves three key components: task splitting, noise injection, and rule-based evaluation.
As shown in Figure 3, a complex task is decomposed into two dependent subtasks ($A_1$ and $A_2$). Subtask $A_2$ is intentionally underspecified, requiring the agent to retrieve critical information from the $A_1$ trajectory. To simulate the passage of time and intervening user activities, "irrelevant trajectories" or distractor tasks are injected between the two subtasks, creating context lengths ranging from 25,000 to 150,000 tokens.
The evaluation utilizes a subset of 56 tasks from the WebCanvas dataset. Success is measured using "keysteps"—specific URL checkpoints and UI interactions—rather than subjective LLM-based grading, ensuring a rigorous and consistent assessment of agent performance.
Performance Collapse in Long Contexts
The study reveals a dramatic degradation in performance as context length increases. While state-of-the-art models like Claude 3.7 and GPT-4.1 achieve success rates of 40-50% in "no noise" conditions, these rates plummet significantly as the context window fills with irrelevant data.
Figure 5 illustrates this performance collapse. By the 150,000-token mark, most models' success rates drop below 10%. The researchers identified several primary failure modes:
- The "Loop" Trap: Agents frequently become stuck in repetitive, ineffective action cycles when faced with long contexts.
- Goal Drifting: Agents often lose sight of the original user objective, instead beginning to follow the logic or patterns of the injected distractor tasks.
- Execution vs. Retrieval: Interestingly, models may successfully retrieve the necessary information from $A_1$ but fail to execute the subsequent steps in $A_2$ due to the cognitive load of the long context interfering with planning.
Mitigation and Reasoning Models
To address these challenges, the authors proposed Implicit RAG (iRAG), a strategy where agents are prompted to generate a task-relevant summary of their history before acting. This approach provided modest improvements, particularly for reasoning-focused models. Notably, the o4-mini model demonstrated superior resilience in long-context scenarios, maintaining a 21.2% success rate at 150k tokens (when using iRAG), suggesting that internal chain-of-thought capabilities are vital for maintaining task coherence over long horizons.
Conclusion and Future Directions
The findings suggest that simply expanding context windows is insufficient for creating robust autonomous agents. Future development must focus on more sophisticated memory architectures, improved context filtering, and explicit planning mechanisms to prevent agents from succumbing to goal drift or repetitive loops. As web environments remain dynamic and computationally expensive to navigate, developing agents that can efficiently distinguish signal from noise in massive interaction histories remains a critical frontier for AI research.
Summary updated