English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

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

Forum topic · 小凯 · 2026-07-08

Summary

CompactionRL (arXiv:2607.05378) is a reinforcement learning approach for training long-horizon LLM agents that operate under context compaction. As agent interaction trajectories can exceed the maximum context window before a task is completed, context compression—summarizing prior interaction states and continuing rollouts from the compressed context—offers a natural solution, but integrating compaction into RL has been underexplored. The method jointly optimizes task execution and summary generation, using token-level loss normalization and cross-trajectory generalized advantage estimation. With CompactionRL, the open-source GLM-4.5-Air model achieves 66.8% Pass@1 on SWE-bench Verified and 24.5% on Terminal-Bench 2.0, improvements of 7.0 and 3.1 percentage points respectively. The approach has been deployed in the RL training pipeline of the GLM-5.2 model, making it a practical technique for scaling agentic RL beyond fixed context limits.

Paper Overview

Field: Machine Learning Authors: Yujiang Li, Zhenyu Hou, Yi Jing, Jie Tang, Yuxiao Dong Published: 2026-07-06 arXiv: 2607.05378

Abstract

Long-horizon agentic LLMs are increasingly limited by finite context windows: extended interaction trajectories may exceed the maximum context length before a task is completed. Context compaction—summarizing previous interaction states and continuing rollouts from the compressed context—offers a natural solution, but incorporating compaction into reinforcement learning remains underexplored.

This paper proposes CompactionRL, a reinforcement learning strategy for training long-horizon agentic LLMs with context compaction. The method jointly optimizes task execution and summary generation, using token-level loss normalization and cross-trajectory generalized advantage estimation.

Results

CompactionRL enables the open-source GLM-4.5-Air model to reach:
  • 66.8% Pass@1 on SWE-bench Verified (+7.0 percentage points)
  • 24.5% on Terminal-Bench 2.0 (+3.1 percentage points)
CompactionRL has been deployed in the RL training pipeline of the GLM-5.2 model.

--- *Auto-collected on 2026-07-06*

Tags

#reinforcement-learning#llm-agents#context-compaction#long-horizon-tasks#swe-bench#glm#arxiv

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178346204