The finite context window of Large Language Models presents a critical bottleneck for long-horizon agentic tasks. As interaction trajectories extend, they can exceed the maximum context length, hindering task completion. Context compaction offers a solution by summarizing past states, but its integration with reinforcement learning has been largely unexplored. This paper introduces CompactionRL, a novel reinforcement learning strategy designed to train long-horizon agentic LLMs with context compaction, as detailed on arXiv.
Joint Optimization for Long-Horizon Agents
CompactionRL tackles the context limitation by jointly optimizing task execution and summary generation. This is achieved through token-level loss normalization and cross-trajectory generalized advantage estimation, enabling LLM agents to learn effectively from compacted, extended trajectories. This approach represents a significant step in overcoming the inherent constraints of current LLM architectures for complex, multi-step reasoning.
