FoldAct: Efficient and Stable Context Folding for Long-Horizon Search Agents
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
Long-horizon reinforcement learning (RL) for large language models faces critical scalability challenges from unbounded context growth, leading to context folding methods that compress interaction history during task execution. However, existing approaches treat summary actions as standard actions, overlooking that summaries fundamentally modify the agent's future observation space, creating a policy-dependent, non-stationary observation distribution that violates core RL assumptions. This introduces three fundamental challenges: (1) gradient dilution where summary tokens receive insufficient training signal, (2) self-conditioning where policy updates change summary distributions, creating a vicious cycle of training collapse, and (3) computational cost from processing unique contexts at each turn. We introduce FoldActfootnotehttps://github.com/SHAO-Jiaqi757/FoldAct, a framework that explicitly addresses these challenges through three key innovations: separated loss computation for independent gradient signals on summary and action tokens, full context consistency loss to reduce distribution shift, and selective segment training to reduce computational cost. Our method enables stable training of long-horizon search agents with context folding, addressing the non-stationary observation problem while improving training efficiency with 5.19× speedup.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 22 of its 26 references that are in the map. First posted on arXiv 28 Dec 2025.
Builds on
22 of 26 references.
Closest ancestors · 5
Same direction, newest first
- 2025AgentFold: Long-Horizon Web Agents with Proactive Context Management28 Oct
- 2025Scaling Long-Horizon LLM Agent via Context-Folding13 Oct
- 2025ACON: Optimizing Context Compression for Long-horizon LLM Agents1 Oct
- 2025ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarization16 Sep
- 2025Memory-R1: Enhancing Large Language Model Agents to Manage and Utilize Memories via Reinforcement Learning27 Aug
Other references · 17
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
- 2025Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learningcited by 1,444
- 2022When Not to Trust Language Models: Investigating Effectiveness of Parametric and Non-Parametric Memoriescited by 1,128
- 2023GAIA: a benchmark for General AI Assistantscited by 1,128
- 2025BrowseComp: A Simple Yet Challenging Benchmark for Browsing Agentscited by 647
- 2025DeepResearcher: Scaling Deep Research via Reinforcement Learning in Real-world Environmentscited by 286
- 2025WebSailor: Navigating Super-human Reasoning for Web Agentcited by 229
- 2025WebDancer: Towards Autonomous Information Seeking Agencycited by 188
- 2025WebWalker: Benchmarking LLMs in Web Traversalcited by 175
- 2025Beyond Ten Turns: Unlocking Long-Horizon Agentic Search with Large-Scale Asynchronous RLcited by 150
5 more
- 2025Reinforcement Learning for Long-Horizon Interactive LLM Agentscited by 108
- 2025WebExplorer: Explore and Evolve for Training Long-Horizon Web Agentscited by 92
- 2025AgentGym-RL: Training LLM Agents for Long-Horizon Decision Making through Multi-Turn Reinforcement Learningcited by 72
- 2025Scaling LLM Multi-turn RL with End-to-end Summarization-based Context Managementcited by 51
- 2025COMPASS: Enhancing Agent Long-Horizon Reasoning with Evolving Contextcited by 20
Built on by
Citing papers per year: 2026: 6.
6 papers.
- 2026Self-Compacting Language Model Agentscited by 11
- 2026See, Remember, Explore: A Benchmark and Baselines for Streaming Spatial Reasoningcited by 4
- 2026EvoDS: Self-Evolving Autonomous Data Science Agent with Skill Learning and Context Managementcited by 2
- 2026ContextPilot: Teaching Agents for Proactive Context Management via Fine-grained RLcited by 2
- 2026LongCat-DeepResearch Technical Reportcited by 0
- 2026DAGent: Evaluate-then-Grow Planning for Deep Research Agentscited by 0
- 2026DAGent: Evaluate-then-Grow Planning for Deep Research Agents30 Sep 2026
- 2026LongCat-DeepResearch Technical Report28 Sep 2026
- 2026ContextPilot: Teaching Agents for Proactive Context Management via Fine-grained RL28 Aug 2026
- 2026Self-Compacting Language Model Agents22 Jun 2026
- 2026EvoDS: Self-Evolving Autonomous Data Science Agent with Skill Learning and Context Management2 Jun 2026
- 2026See, Remember, Explore: A Benchmark and Baselines for Streaming Spatial Reasoning25 Mar 2026
Similar, not cited
Close in wording, no citation either way
- 2026Toward Reliable Context Compression for Long-Horizon Agents: An Empirical Study of Execution Instability
- 2026Escaping the Context Bottleneck: Active Context Curation for LLM Agents via Reinforcement Learning
- 2026ReFold: Training-Free Reversible Inter-Turn Context Folding for Long-Horizon Agents
- 2026LongAct: Harnessing Intrinsic Activation Patterns for Long-Context Reinforcement Learning
- 2026CompactionRL: Reinforcement Learning with Context Compaction for Long-Horizon Agents
- 2026HIPIF: Hierarchical Planning and Information Folding for Long-Horizon LLM Agent Learning
- 2026PRO-LONG: Programmatic Memory Enables Long-Horizon Reasoning
- 2026StateComp: Learning When to Compress History in Long Horizon Agents