CORTEXA
← Browse
arxivcs.LG2026-07-06

CompactionRL: Reinforcement Learning with Context Compaction for Long-Horizon Agents

Yujiang Li, Zhenyu Hou, Yi Jing, Jie Tang, Yuxiao Dong

Long-horizon agentic LLMs are increasingly limited by finite context windows, as extended interaction trajectories can exceed the maximum context length before a task is completed. Context compaction offers a natural solution by summarizing previous interaction states and continuing the rollout under a compressed context, but incorporating compaction into reinforcement learning remains underexplored. We propose CompactionRL, a reinforcement learning strategy to train long-horizon agentic LLMs with context compaction. Our approach jointly optimizes task execution and summary generation with token-level loss normalization and cross-trajectory generalized advantage estimation. This design enables the LLM agents to learn from compacted long-horizon trajectories. We train CompactionRL on top of open models and observe consistent performance gains on agentic coding tasks. CompactionRL enables the open GLM-4.5-Air model (106B-A30B) to achieve Pass@1 scores of 66.8% on SWE-bench Verified and 24.5% on Terminal-Bench 2.0, with absolute gains of 7.0 and 3.1 points, respectively. Built upon GLM-4.7-Flash (30B-A3B), CompactionRL improves Pass@1 by 5.5 and 6.8 points, reaching 56.0% on SWE-bench Verified and 20.2% on Terminal-Bench 2.0, respectively. CompactionRL is thus deployed in the RL pipeline for training the open GLM-5.2 model (750B-A40B).

View free PDFSource page

Related papers

arxivcs.LGcs.AI2026-07-11

BattVAE-GP: Generative Modeling of Long-Horizon Battery Degradation with Uncertainty Quantification

Raghvender Raghvender, Mahdi Abid, Ferran Brosa Planella, Charles Delacourt, Arnaud Demortière

Long-horizon physics-based simulations of battery degradation provide mechanistic insight but remain computationally expensive, limiting their use for dense exploration of operating conditions over extended cycle life. Here, we propose a hybrid physics-probabilistic learning fram…

View free PDFSource page
arxivcs.LGcs.CL2026-07-15

Branching Policy Optimization: Sandbox-Native Language Agent Reinforcement Learning

Bowei He, Yankai Chen, Xiaokun Zhang, Xue Liu

Reinforcement learning has emerged as the dominant paradigm for training large language model (LLM) agents that interact with executable sandboxes. State-of-the-art algorithms such as PPO, RLOO, and GRPO inherit their rollout topology from RLHF: for each prompt, N independent tra…

View free PDFSource page
arxivcs.LG2026-07-20

SEE: Structure-aware Exploring \& Exploiting for Long-horizon GUI Agent Trajectory Synthesis

Zhuohang Fan, Beichen Zhang, Yuanfa Li, Changqiao Wu, Wei Liu, Jian Luan, et al.

Graphical User Interface (GUI) agents powered by vision-language models hold promise for automating real-world mobile tasks. However, progress is limited by the lack of high-coverage, long-horizon interaction trajectories collected from element-rich and rapidly evolving apps. Exi…

View free PDFSource page
arxivcs.LG2026-07-15

TRACE: Turn-level Reward Assignment via Credit Estimation for Long-Horizon Agents

Leitian Tao, Baolin Peng, Wenlin Yao, Tao Ge, Hao Cheng, Mike Hang Wang, et al.

Multi-turn agents solve complex tasks through extended sequences of tool interactions before producing a final answer, making credit assignment a fundamental challenge during post-training. Outcome rewards provide reliable supervision for short-horizon reasoning, but become spars…

View free PDFSource page
arxivcs.LGcs.AIcs.CLcs.OS2026-07-19

WAR: Workload-Aware Rollouts for Synchronous Agentic Reinforcement Learning

Ryan Xu, Atlas Zhao, David Bao, Frank Du

Long-horizon rollout generation has become the dominant systems bottleneck in agentic reinforcement learning (RL). As agents interact with environments over many turns, trajectories rapidly grow to tens of thousands of tokens, making synchronous RL training increasingly constrain…

View free PDFSource page
arxivcs.SEcs.LG2026-07-08

DeepSWE: Measuring Frontier Coding Agents on Original, Long-Horizon Engineering Tasks

Wenqi Huang, Charley Lee, Leonard Tng, Serena Ge

DeepSWE is a benchmark of 113 original, long-horizon software engineering tasks for evaluating coding agents. Most public agentic coding benchmarks follow SWE-bench in mining merged fixes from public GitHub repositories, which creates two problems: the fixes and their discussion…

View free PDFSource page