mlsanityData to 7 Oct 2026

Scaling Long-Horizon LLM Agent via Context-Folding

arXiv 2510.11967 ↗First posted 13 Oct 2025cs.CL cs.LGcited by 136

On the map: LLM agents and tool use → Agent memory systems

Abstract (arXiv)

Large language model (LLM) agents are fundamentally constrained by context length on long-horizon tasks. We introduce Context-Folding, a framework that empowers agents to actively manage their working context. An agent can procedurally branch into a sub-trajectory to handle a subtask and then fold it upon completion, collapsing the intermediate steps while retaining a concise summary of the outcome. To make this behavior learnable, we develop an end-to-end reinforcement learning framework FoldGRPO with specific process rewards to encourage effective task decomposition and context management. On complex long-horizon tasks (Deep Research and SWE), our folding agent matches or outperforms the ReAct baselines while using an active context 10× smaller and significantly outperforms models that rely on summarization-based context management.

Key facts. Cited by 136 papers in the map (data through 7 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 33 of its 42 references that are in the map. First posted on arXiv 13 Oct 2025.

Builds on

33 of 42 references.

Closest ancestors · 3

Same direction, newest first

  1. 2025ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarization16 Sep
  2. 2025Agent KB: Leveraging Cross-Domain Experience for Agentic Problem Solving8 Jul
  3. 2025MEM1: Learning to Synergize Memory and Reasoning for Efficient Long-Horizon Agents18 Jun

Other references · 30

  1. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
  2. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  3. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  5. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
  6. 2023A Survey on Large Language Model based Autonomous Agentscited by 2,203
  7. 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,081
  8. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  9. 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 1,908
  10. 2025Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learningcited by 1,371
  11. 2022Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agentscited by 1,029
  12. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 956
18 more
  1. 2023Graph of Thoughts: Solving Elaborate Problems with Large Language Modelscited by 873
  2. 2025BrowseComp: A Simple Yet Challenging Benchmark for Browsing Agentscited by 616
  3. 2025WebThinker: Empowering Large Reasoning Models with Deep Research Capabilitycited by 320
  4. 2024Training Software Engineering Agents and Verifiers with SWE-Gymcited by 300
  5. 2025MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agentcited by 235
  6. 2024Chain of Agents: Large Language Models Collaborating on Long-Context Taskscited by 201
  7. 2025The Landscape of Agentic Reinforcement Learning for LLMs: A Surveycited by 195
  8. 2025BrowseComp-Plus: A More Fair and Transparent Evaluation Benchmark of Deep-Research Agentcited by 183
  9. 2025Measuring AI Ability to Complete Long Software Taskscited by 142
  10. 2025SWE-rebench: An Automated Pipeline for Task Collection and Decontaminated Evaluation of Software Engineering Agentscited by 127
  11. 2025WideSearch: Benchmarking Agentic Broad Info-Seekingcited by 66
  12. 2025WebResearcher: Unleashing unbounded reasoning capability in Long-Horizon Agentscited by 66
  13. 2025WebSailor-V2: Bridging the Chasm to Proprietary Agents via Synthetic Data and Scalable Reinforcement Learningcited by 59
  14. 2025Scaling LLM Multi-turn RL with End-to-end Summarization-based Context Managementcited by 51
  15. 2024LongAgent: Scaling Language Models to 128k Context through Multi-Agent Collaborationcited by 38
  16. 2025CO-Bench: Benchmarking Language Model Agents in Algorithm Search for Combinatorial Optimizationcited by 28
  17. 2024Long Context RAG Performance of Large Language Modelscited by 23
  18. 2025CoMind: Towards Community-Driven Agents for Machine Learning Engineeringcited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 10; 2026: 126.

136 papers.

Sort:

By area:

  1. 2025Memory in the Age of AI Agentscited by 285
  2. 2025Recursive Language Modelscited by 94
  3. 2025DeepAgent: A General Reasoning Agent with Scalable Toolsetscited by 69
  4. 2026Natural-Language Agent Harnessescited by 54
  5. 2025Training Proactive and Personalized LLM Agentscited by 42
  6. 2026Meta Context Engineering via Agentic Skill Evolutioncited by 42
  7. 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agentscited by 40
  8. 2026A Survey of Agent Memory in the Second Half: Towards Self-Evolving and Long-Horizon Agentscited by 40
  9. 2026Code as Agent Harnesscited by 40
  10. 2025Context as a Tool: Context Management for Long-Horizon SWE-Agentscited by 38
  11. 2026AOrchestra: Automating Sub-Agent Creation for Agentic Orchestrationcited by 30
  12. 2026SWE-rebench V2: Language-Agnostic SWE Task Collection at Scalecited by 24
38 more
  1. 2026Anatomy of Agentic Memory: Taxonomy and Empirical Analysis of Evaluation and System Limitationscited by 20
  2. 2026OS-Symphony: A Holistic Framework for Robust and Generalist Computer-Using Agentcited by 19
  3. 2026From Storage to Experience: A Survey on the Evolution of LLM Agent Memory Mechanismscited by 19
  4. 2025Resolving Evidence Sparsity: Agentic Context Engineering for Long-Document Understandingcited by 18
  5. 2026SWE-Master: Unleashing the Potential of Software Engineering Agents via Post-Trainingcited by 18
  6. 2026Building Effective AI Coding Agents for the Terminal: Scaffolding, Harness, Context Engineering, and Lessons Learnedcited by 18
  7. 2026Agentic Aggregation for Parallel Scaling of Long-Horizon Agentic Taskscited by 18
  8. 2025SCOPE: Prompt Evolution for Enhancing Agent Effectivenesscited by 16
  9. 2026Scaling the Horizon, Not the Parameters: Reaching Trillion-Parameter Performance with a 35B Agentcited by 16
  10. 2026MemOCR: Layout-Aware Visual Memory for Efficient Long-Horizon Reasoningcited by 15
  11. 2026MemoryCD: Benchmarking Long-Context User Memory of LLM Agents for Lifelong Cross-Domain Personalizationcited by 15
  12. 2026Mem-T: Densifying Rewards for Long-Horizon Memory Agentscited by 14
  13. 2026ContextBudget: Budget-Aware Context Management for Long-Horizon Search Agentscited by 13
  14. 2025AI Meets Brain: Memory Systems from Cognitive Neuroscience to Autonomous Agentscited by 12
  15. 2026MemoBrain: Executive Memory as an Agentic Brain for Reasoningcited by 12
  16. 2026Learning Agent-Compatible Context Management for Long-Horizon Taskscited by 12
  17. 2026SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agentscited by 12
  18. 2026Evo-Harness: Context-to-Harness Skill Compilation for Self-Evolving Agentscited by 12
  19. 2026Memex(RL): Scaling Long-Horizon LLM Agents via Indexed Experience Memorycited by 11
  20. 2026Coding Agents are Effective Long-Context Processorscited by 11
  21. 2026ClawGym: A Scalable Framework for Building Effective Claw Agentscited by 11
  22. 2026VitaBench 2.0: Evaluating Personalized and Proactive Agents in Long-Term User Interactionscited by 11
  23. 2026Self-Compacting Language Model Agentscited by 11
  24. 2026SideQuest: Model-Driven KV Cache Management for Long-Horizon Agentic Reasoningcited by 10
  25. 2026SAM: State-Adaptive Memory for Long-Horizon Reasoning Agentcited by 10
  26. 2026Remember When It Matters: Proactive Memory Agent for Long-Horizon Agentscited by 10
  27. 2026Recursive Models for Long-Horizon Reasoningcited by 9
  28. 2026The Pensieve Paradigm: Stateful Language Models Mastering Their Own Contextcited by 8
  29. 2026All-Mem: Agentic Lifelong Memory via Dynamic Topology Evolutioncited by 8
  30. 2026Understanding the Challenges in Iterative Generative Optimization with LLMscited by 8
  31. 2026CompactionRL: Reinforcement Learning with Context Compaction for Long-Horizon Agentscited by 8
  32. 2026ACM: Agentic Context Management for Long Horizon Taskscited by 8
  33. 2026U-Fold: Dynamic Intent-Aware Context Folding for User-Centric Agentscited by 7
  34. 2026Ares: Adaptive Reasoning Effort Selection for Efficient LLM Agentscited by 7
  35. 2026Decentralized Multi-Agent Systems with Shared Contextcited by 7
  36. 2026Beyond Compaction: Structured Context Eviction for Long-Horizon Agentscited by 7
  37. 2025FoldAct: Efficient and Stable Context Folding for Long-Horizon Search Agentscited by 6
  38. 2026VimRAG: Navigating Massive Visual Context in Retrieval-Augmented Generation via Multimodal Memory Graphcited by 5

50 most cited of 136 All 136 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2026PRO-LONG: Programmatic Memory Enables Long-Horizon Reasoning
  2. 2026Escaping the Context Bottleneck: Active Context Curation for LLM Agents via Reinforcement Learning
  3. 2026Parallel Context Compaction for Long-Horizon LLM Agent Serving
  4. 2025ACON: Optimizing Context Compression for Long-horizon LLM Agents
  5. 2026ContextPilot: Teaching Agents for Proactive Context Management via Fine-grained RL
  6. 2026Toward Reliable Context Compression for Long-Horizon Agents: An Empirical Study of Execution Instability
  7. 2024Controlling Large Language Model Agents with Entropic Activation Steering
  8. 2026A Subgoal-driven Framework for Improving Long-Horizon LLM Agents