# Agentic LLMs Break Context Limits _CompactionRL integrates context summarization into reinforcement learning for agentic LLMs, breaking context window limits and boosting performance on coding tasks._ **Updated:** 2026-08-22 **Published:** 2026-07-07 **Source:** https://www.startuphub.ai/ai-news/ai-research/2026/agentic-llms-break-context-limits --- 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](https://arxiv.org/abs/2607.05378v1). LLM Context LimitsDriverfinite context window hinders long-horizon agentic tasksContext CompactionContextsummarizing past states to overcome context limitationsFrom the article 5 mentionsContext compaction offers a solution by summarizing past states, but its integration with reinforcement learning has been largely unexplored.CompactionRL IntroducedCorenovel RL strategy for context compaction in LLM agentsFrom the article 6 mentionsThis paper introduces CompactionRL, a novel reinforcement learning strategy designed to train long-horizon agentic LLMs with context compaction, as detailed on arXiv.usesJoint OptimizationCoreoptimizing task execution and summary generation simultaneouslyToken Loss NormalizationContextenabling effective learning from compacted, extended trajectoriesFrom the articleThis is achieved through token-level loss normalization and cross-trajectory generalized advantage estimation, enabling LLM agents to learn effectively from compacted, extended trajectories.Cross-Trajectory GAEContextgeneralized advantage estimation across multiple interaction trajectoriesFrom the articleThis is achieved through token-level loss normalization and cross-trajectory generalized advantage estimation, enabling LLM agents to learn effectively from compacted, extended trajectories.Breaks Context LimitsEffectenables LLM agents to handle much longer interaction historiesleads toBoosts Coding TasksOutcomedemonstrates improved performance on complex coding challengesFrom the articleThe effectiveness of CompactionRL is demonstrated through consistent performance gains on agentic coding tasks. ## 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. ## Empirical Validation on Coding Tasks The effectiveness of CompactionRL is demonstrated through consistent performance gains on agentic coding tasks. When applied to the open GLM-4.5-Air model (106B-A30B), CompactionRL achieved absolute improvements of 7.0 points on SWE-bench Verified (reaching 66.8% Pass@1) and 3.1 points on Terminal-Bench 2.0 (reaching 24.5% Pass@1). Further enhancements were observed with the GLM-4.7-Flash model (30B-A3B), boosting Pass@1 scores by 5.5 and 6.8 points to 56.0% and 20.2% respectively on the same benchmarks. These results underscore the practical benefits of the proposed strategy. ## Scaling to State-of-the-Art Open Models The strategic implications of CompactionRL are substantial, as evidenced by its deployment in the RL pipeline for training the open GLM-5.2 model (750B-A40B). This demonstrates the scalability and efficacy of the CompactionRL framework in pushing the boundaries of what open-source LLMs can achieve in complex, long-context scenarios, promising more capable and accessible agentic AI systems. --- Original analysis from [startuphub.ai](https://www.startuphub.ai), the #1 AI startup directory. © StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training on this content requires a license. See https://www.startuphub.ai/terms.