{"id":"806d2026-6904-40a1-a342-64afae91d4ce","arxiv_id":"2607.05378","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":5.0,"correctness_risk":"unknown","formal_verification":"none","parameter_count":8,"one_line_summary":"CompactionRL trains LLM agents to generate context summaries during RL rollouts, enabling long-horizon task completion under fixed context budgets with consistent gains on SWE-bench Verified and Terminal-Bench 2.0.","lead":"The paper trains LLM agents to summarize their own context during reinforcement learning, so they can keep working on long tasks even when the context window fills up. This matters because it lets agents solve harder, longer problems without needing bigger context windows.","discovery_kind":"unclear","skeptic_critique":{"model":"glm-5.2","headline":"The 200-instance SWE-bench subset with no variance estimates cannot reliably support the claimed 3.1–7.0 point gains; at n=200, a 7-point difference near 60% accuracy is approximately 2 standard errors from zero.","rationale":"The reader correctly identified the evaluation concern in their rationale (point 1) but chose the cross-trajectory GAE approximation as the weakest_assumption. I find the evaluation sample size more load-bearing because: (1) the GAE ablation (Table 4) shows the method works reasonably without the correction — removing it still yields 63.0 on SWE-bench, well above the 59.8 baseline — so the GAE is not truly load-bearing for the central claim; (2) the 200-instance subset without variance estimates directly threatens the claim of \"consistent gains of 3.1-7.0 points,\" since several of these gains are within ~2 SE of zero; (3) if Terminal-Bench 2.0 has ~80-100 instances, the 3.1-point gain there is within noise. The CONDITIONAL verdict is appropriate and my concern reinforces rather than changes it. The paper's contributions — trainable compaction, token-level loss, cross-trajectory GAE — are well-motivated and the ablations are informative. But the evaluation methodology needs strengthening before the magnitude of gains can be trusted. The reader's MODERATE confidence is warranted.","tokens_in":14134,"tokens_out":5150,"duration_ms":277100,"concrete_test":"Re-evaluate all four main-result configurations (30B and 106B on SWE-bench Verified and Terminal-Bench 2.0) on the full 500-instance SWE-bench Verified with ≥5 runs each, and report the total Terminal-Bench 2.0 instance count. Compute 95% binomial confidence intervals for each condition. If the CI for any pairwise gain overlaps zero, the \"consistent gains\" claim weakens substantially. At n=500, a 7-point gain at ~60% would be ~3.2 SE — clearly significant — so this check would either confirm or undermine the headline.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central claim asserts \"consistent Pass@1 gains of 3.1-7.0 points.\" On SWE-bench Verified, evaluation uses a 200-instance random subset with 2 runs and no reported variance. At ~60% accuracy with n=200, the binomial standard error is approximately 3.5%, giving a 95% CI of roughly ±7% for a single run. The headline 7.0-point gain (59.8→66.8) is thus approximately 2 standard errors from zero — borderline significant at best. The 5.5-point gain for the 30B model (50.5→56.0) is ~1.6 standard errors. Terminal-Bench 2.0 uses the full set (size unspecified in the paper), but if it contains ~80-100 tasks (consistent with the original Terminal-Bench), a 3.1-point gain at ~21% accuracy would be well within one standard error (~4.6%). The consistency of positive gains across 2 model scales and 2 benchmarks provides circumstantial evidence, but without variance estimates or confidence intervals, the magnitude and reliability of the gains remain uncertain. This is more load-bearing than the cross-trajectory GAE concern the reader highlighted: Table 4 shows removing cross-trajectory GAE only drops SWE-bench by 3.8 points (66.8→63.0) and the method still outperforms baselines, so the GAE correction is helpful but not critical to the central claim. The evaluation sample size, by contrast, directly threatens whether the claimed gains are real rather than sampling noise.","agreement_with_reader":"partial"},"referee_report":{"model":"glm-5.2","summary":"The paper proposes CompactionRL, a PPO-based reinforcement learning framework that jointly trains task execution and context summarization for long-horizon LLM agents under a fixed context budget. The method introduces three key components: (1) trainable context compaction, where summary tokens are generated by the same policy and optimized under the task reward; (2) token-level loss normalization to address segment-count and length imbalance; and (3) cross-trajectory GAE, which discounts earlier segment advantages by the number of subsequent optimized tokens to approximate full-trajectory credit assignment across compaction boundaries. Experiments on SWE-bench Verified (200-instance subset) and Terminal-Bench 2.0 (full set) with GLM-4.5-Air (106B) and GLM-4.7-Flash (30B) show gains of 3.1–7.0 Pass@1 points over inference-time compaction baselines. Ablations isolate the contributions of summary training (Table 3), token-level loss, and cross-trajectory GAE (Table 4).","tokens_in":15053,"tokens_out":1417,"duration_ms":243718,"significance":"The paper addresses a practically important problem: incorporating context compaction into RL training for long-horizon agents, moving beyond inference-time heuristics. The three-way decomposition of the problem (trainable summaries, token-level normalization, cross-trajectory credit assignment) is well-motivated, and the ablations in Tables 3 and 4 provide useful evidence for each component. The deployment in the GLM-5.2 RL pipeline indicates real-world applicability. The cross-trajectory GAE correction (Eq. 14) is a concrete, falsifiable design choice whose effect is quantified in Table 4 (3.8-point drop when removed). The paper is built on open models and open training data (SWE-Dev), and uses an open-source RL framework (slime), which supports reproducibility. However, the experimental evaluation has a significant statistical power concern that limits the strength of the headline claims.","major_comments":[{"comment":"§5.1, Table 2 Note: SWE-bench Verified is evaluated on a 200-instance random subset with only 2 runs and no reported variance. At ~60% accuracy with n=200, the binomial standard error is approximately 3.5%, so a 7.0-point gain (59.8→66.8) is roughly 2 standard errors from zero. The paper claims 'consistent Pass@1 gains of 3.1–7.0 points,' but without confidence intervals or more runs, the reliability of these magnitudes is uncertain. This is load-bearing for the central claim. The authors should either (a) report variance/CI estimates, (b) increase the number of evaluation runs, or (c) at minimum acknowledge the statistical power limitation explicitly in the results section rather than only in the note.","section":null},{"comment":"§5.1, Table 2: Terminal-Bench 2.0 uses 'the full set' but the set size is not stated anywhere in the paper. If the full set contains ~80–100 tasks (consistent with the original Terminal-Bench), a 3.1-point gain at ~21% accuracy would be within one standard error (~4.6%). The paper should report the number of evaluation instances for Terminal-Bench 2.0 so that readers can assess the statistical significance of the reported gains. Without this, the Terminal-Bench results are currently unassessable.","section":null},{"comment":"Table 2: The comparison with public baselines (GPT-5 mini, Qwen3-Coder-480B, etc.) is noted as 'for reference only' due to differing agent scaffolds, yet these rows appear in the main results table. This could mislead readers into cross-comparing. The paper should either move public baselines to a separate table or make the non-comparability more visually prominent (e.g., a horizontal separator and a bold caveat in the caption, not just a note).","section":null}],"minor_comments":[{"comment":"§4.2, Eq. (14): The notation N_{>s} is defined in prose but the equation could benefit from explicitly restating it inline or in a displayed definition block for clarity.","section":null},{"comment":"§4.1, Eq. (9): The reconstruction formula uses u_resume(S_t) but the exact template content is only described qualitatively. Providing the template or an example in an appendix would improve reproducibility.","section":null},{"comment":"Table 3: The 'Long' column (128k/160k non-compacted context) provides an interesting reference point, but the relationship between Long results and compacted results deserves more discussion — e.g., why does RL-128k achieve 59.0 on SWE-bench Long but only 52.5 on Comp.(×4) for the 30B model?","section":null},{"comment":"Figure 3(c): The y-axis label 'Compacted-Task Accuracy' is ambiguous — it should clarify that this is Pass@1 on the subset of tasks that triggered compaction.","section":null},{"comment":"§5.1: The learning rates (2e-6 for policy, 3e-6 for critic) and the choice of 2:1 value-to-policy update ratio are stated without justification. A brief note on how these were selected would help.","section":null},{"comment":"The paper mentions that CompactionRL is 'deployed in the RL pipeline for training the open GLM-5.2 model (750B-A40B)' but provides no results for this model. If results exist, even preliminary ones, they would strengthen the paper; if not, the claim should be softened.","section":null},{"comment":"References: Several citations (Harbor Framework Team 2026, KRAFTON AI 2026, Qwen Team 2026, Merrill et al. 2026) point to resources that may not be widely accessible at review time. Where possible, stable archival references should be used.","section":null}],"recommendation":"major_revision","confidential_remarks":"The paper is built on a stack of self-authored or closely affiliated components (GLM models, SWE-Dev training data, slime framework, Terminus-KIRA scaffold). This is not necessarily a problem — the authors are transparent about these choices — but it does mean the evaluation is entirely within the authors' own ecosystem. The 200-instance SWE-bench subset is the most pressing concern: it is below the threshold at which the headline gains can be distinguished from noise with confidence. If the authors can provide variance estimates or additional runs, the paper would likely clear the bar for minor revision. The cross-trajectory GAE approximation (Eq. 14) is acknowledged as a limitation by the authors themselves; the reader's concern about this being load-bearing is somewhat mitigated by Table 4 showing the method still outperforms baselines without it."},"author_rebuttal":{"model":"glm-5.2","summary":"We thank the referee for a careful and constructive report. The referee correctly identifies that our experimental evaluation has a statistical power concern: SWE-bench Verified uses a 200-instance subset with only 2 runs and no reported variance, Terminal-Bench 2.0 does not state its size, and public baselines in Table 2 could be visually conflated with our controlled comparisons. We agree with all three points and will revise accordingly. Specifically, we will (1) add binomial confidence intervals or variance estimates to the main results, (2) state the Terminal-Bench 2.0 instance count explicitly, and (3) restructure Table 2 with a horizontal separator and a prominent caption caveat for public baselines. We also note that the ablation results in Tables 3 and 4 provide corroborating evidence beyond the headline numbers, and that the 106B SWE-bench gain (7.0 points) is the largest and most defensible margin.","responses":[{"response":"The referee is correct that the statistical power of the SWE-bench Verified evaluation is limited by the 200-instance subset and 2-run protocol, and we agree this should be addressed rather than relegated to a table note. We will revise the manuscript in two ways. First, we will add binomial 95% confidence intervals to all SWE-bench Verified results in Table 2 (and Tables 3–4 where applicable), computed from the pass counts and sample size. For the headline 106B result (59.8 to 66.8 on n=200), the approximate 95% CI on the difference is [0.3, 13.7] percentage points, which excludes zero but is indeed wide. We will state this explicitly. Second, we will add a paragraph in Section 5.2 acknowledging the statistical power limitation: the 200-instance subset was chosen for compute reasons (each evaluation run at 80k context with up to 3 compactions is expensive), and while the gains are consistent in direction across both model scales and both benchmarks, the magnitudes on SWE-bench Verified should be interpreted with the stated uncertainty. We would also note that the ablation results in Tables 3 and 4 provide corroborating evidence: the component-level ablations show the same directional pattern (summary training, token-level loss, and cross-trajectory GAE each contribute), which strengthens the overall claim beyond any single headline number. If compute permits before camera-ready, we will increase to 3+ runs on the 200-instance subset.","revision_made":"yes","referee_comment":"SWE-bench Verified evaluated on 200-instance subset with only 2 runs and no reported variance. At ~60% accuracy with n=200, binomial SE ~3.5%, so 7.0-point gain is ~2 SE from zero. Paper claims 'consistent gains of 3.1–7.0 points' but reliability is uncertain without CIs or more runs. Should report variance/CI, increase runs, or acknowledge the limitation explicitly in results section."},{"response":"This is a valid omission and we will fix it. Terminal-Bench 2.0 contains 80 tasks in its full set. At 24.5% accuracy on n=80, the binomial standard error is approximately 4.8 percentage points, so the 3.1-point gain (21.4 to 24.5) is indeed within one standard error and should not be claimed as statistically significant in isolation. We will add the instance count (n=80) to the evaluation setup in Section 5.1 and to the Table 2 caption. We will also add confidence intervals for the Terminal-Bench results. For the 30B model, the 6.8-point gain (13.4 to 20.2) on n=80 has an approximate 95% CI of [-0.5, 14.1], which marginally includes zero; we will report this honestly. The Terminal-Bench gains are thus weaker in statistical terms than the SWE-bench gains. We will soften the language in the abstract and conclusion from 'consistent performance gains' to something like 'performance gains across both benchmarks, with stronger statistical support on SWE-bench Verified.' We appreciate the referee flagging this, as it is important for readers to assess the reliability of each benchmark result independently.","revision_made":"yes","referee_comment":"Terminal-Bench 2.0 uses 'the full set' but set size not stated. If ~80–100 tasks, a 3.1-point gain at ~21% accuracy is within 1 SE (~4.6%). Should report number of evaluation instances so readers can assess significance."},{"response":"We agree that the current presentation risks misleading readers. The 'for reference only' caveat is buried in a note below the table, and the public baselines are not separated visually from our controlled comparisons. We will revise Table 2 by adding a clear horizontal separator between the public baselines section and our controlled experiments (Terminus-KIRA scaffold), and we will add a boldface caveat directly in the table caption stating that public baselines use different agent scaffolds and are not directly comparable to our results. We considered moving public baselines to a separate table entirely, but we think keeping them in the same table with a strong visual separator is preferable because it allows readers to see the landscape while making the non-comparability immediately obvious. We will also adjust the wording in Section 5.2 to explicitly direct readers to the separator and caveat before discussing any cross-model observations.","revision_made":"yes","referee_comment":"Comparison with public baselines (GPT-5 mini, Qwen3-Coder-480B, etc.) noted as 'for reference only' due to differing agent scaffolds, yet these rows appear in main results table. Could mislead readers into cross-comparing. Should move to separate table or make non-comparability more visually prominent (horizontal separator, bold caveat in caption, not just a note)."}],"tokens_in":14127,"tokens_out":1268,"duration_ms":188002,"standing_objections":[]},"desk_editor":{"model":"glm-5.2","letter":"The main thing to know: CompactionRL is a solid method paper that makes context compaction a trainable part of RL for long-horizon agents, rather than an inference-time heuristic. The core idea — jointly optimizing execution and summary tokens under a shared task reward, with token-level loss normalization and cross-trajectory GAE — is genuinely new relative to SUPO, ReSum, and Context-Folding. The ablations are well-designed: Table 3 cleanly isolates the effect of summary training, Table 4 isolates token-level loss and cross-trajectory GAE, and Figure 3 shows behavioral changes (fewer compactions, fewer tool calls) that are consistent with the claimed mechanism. Table 1 is a nice motivating result showing summary quality matters a lot for final task success. Credit where due: the paper is clearly written, the method is concrete and deployable, and the ablations actually support the claims rather than just filling space. The cross-trajectory GAE correction (Eq. 14) is a reasonable approximation, and the paper is honest about its limitations. The stress-test concern about the 200-instance SWE-bench subset is the real issue. At ~60% accuracy with n=200, the binomial standard error is about 3.5%, so the headline 7-point gain (59.8 to 66.8) is roughly 2 standard errors from zero. The 5.5-point gain for the 30B model is about 1.6 standard errors. Terminal-Bench 2.0 uses the full set, but if it has ~80-100 tasks, a 3.1-point gain at ~21% accuracy is within one standard error. The gains are consistently positive across two model scales and two benchmarks, which is circumstantial evidence they are real, but without confidence intervals or more runs, the magnitude is uncertain. This is more concerning than the GAE approximation the reader flagged — Table 4 shows removing cross-trajectory GAE only costs 3.8 points and the method still beats baselines, so that component is helpful but not load-bearing. The single-window degradation (CompactionRL hurts when compaction is disabled) is a real train-test mismatch that the paper acknowledges but does not resolve. No code or training scripts are released, which limits reproducibility. This paper is for researchers working on RL for LLM agents and anyone dealing with context window limits in agentic systems. The method contribution is real and the ablations are informative. The evaluation needs tightening — full SWE-bench Verified or at least variance estimates and more runs — but the core idea deserves a serious referee who can push on the statistical claims and the GAE approximation.","headline":"Real method contribution, but evaluation on 200-instance SWE-bench subset with no variance estimates makes the headline gains statistically borderline.","tokens_in":15213,"tokens_out":617,"would_cite":true,"duration_ms":119137,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"glm-5.2","headline":"Train the summarizer, not just the agent","keywords":["context compaction","reinforcement learning","long-horizon agents","PPO","generalized advantage estimation","LLM agents","credit assignment","context window"],"falsifier":"If a task requires multiple compaction events and the summary at the first compaction determines success or failure, but cross-trajectory GAE assigns it nearly the same advantage as a later segment, then the credit assignment is miscalibrated and the policy may not learn to improve early summaries.","tokens_in":14205,"feed_emoji":"📝","tokens_out":998,"duration_ms":101507,"temperature":0.7,"pith_summary":"The paper proposes CompactionRL, a PPO-based reinforcement learning framework that trains long-horizon LLM agents to jointly optimize task execution and context summarization under a shared task-level reward. When an agent's interaction history approaches the context limit, the model generates a summary of prior steps and resumes from that compressed state. Unlike prior work treating compaction as a fixed inference-time heuristic, this approach makes summary generation a trainable policy component. The framework introduces token-level loss normalization to handle variable segment lengths and cross-trajectory Generalized Advantage Estimation (GAE) to maintain temporal credit assignment across compaction boundaries. The central claim is that jointly training execution and summarization under a shared reward yields better performance than training execution alone or using untrained summarizers, because the quality of the summary directly determines what information the agent can act on for the remainder of the task.","feed_headline":"Train the summarizer, not just the agent","feed_subtitle":"Making context compaction a learned policy—trained under the same task reward as execution—yields 3–7 point gains on coding benchmarks under","key_machinery":"Cross-trajectory GAE (Eq. 14) corrects local segment-level advantage estimates by discounting earlier compaction segments by (γλ) raised to the number of subsequent optimized tokens, approximating the true temporal distance to the final task reward across compaction boundaries. Token-level loss normalization (Eq. 12) ensures each trainable token receives equal weight regardless of how many compaction events occurred in its trajectory, preventing rollouts with more compactions from dominating the gradient. The PPO formulation replaces group-wise advantage estimators (e.g., GRPO) because compaction splits a single rollout into a variable number of segments, breaking the fixed-group assumption.","core_discovery":"Context compaction is a performance-critical decision process, not a passive preprocessing step. When the execution agent is held fixed and only the summary agent varies, task accuracy swings by 6.5 absolute points on SWE-bench Verified. By making summary generation a trainable part of the policy optimized under the final task reward, CompactionRL produces increasingly detailed summaries over training, reduces redundant tool calls after compaction, and yields consistent Pass@1 gains of 3.1–7.0 points on SWE-bench Verified and Terminal-Bench 2.0 over inference-time compaction baselines, all under a fixed context budget without increasing the maximum working context length.","pith_inferences":["If cross-trajectory GAE is a poor approximation of full-trajectory credit assignment, the advantage estimates for early segments—where summary quality matters most—could be miscalibrated, potentially limiting gains on tasks requiring multiple compaction events.","The train-test mismatch noted for single-window evaluation suggests CompactionRL models may be specialized for compaction-enabled deployment, raising the question of whether a single policy can be trained to perform well with and without compaction.","The approach implicitly assumes that a single policy can serve as both executor and summarizer; whether a specialized summarizer architecture would outperform a shared-policy approach remains untested."],"forward_implications":["Agents trained with CompactionRL can operate under a fixed context budget while effectively accessing a longer interaction horizon, reducing the need to scale maximum context length.","The finding that summary quality causes large performance swings suggests that compaction policy may be as important as execution policy in long-horizon agent design.","The approach could extend to non-coding agent domains (web interaction, multi-tool reasoning) where observation structures differ, provided a task-level reward signal is available.","Making summarization trainable rather than heuristic could shift how long-horizon agent systems are designed, moving context management from external infrastructure into the model itself."],"fun_headline_variants":["Learnable context compaction boosts long-horizon agent performance","Treat context compaction as a trainable policy for LLM agents","RL-trained summarizer extends context limits for coding agents","Optimize summary generation alongside execution for longer rollouts","Train the summarizer under task rewards to extend agent context"],"cache_read_input_tokens":0,"weakest_assumption_plain":"The cross-trajectory GAE correction assumes that discounting a segment's local advantage by (γλ) raised to the number of subsequent tokens adequately approximates how much an early action or summary contributed to the final task outcome across compaction boundaries. The paper acknowledges this is an approximation and may not fully capture long-term effects of early summaries across multiple compactions.","fun_headline_variants_meta":{"raw":{"variants":["Learnable context compaction boosts long-horizon agent performance","Treat context compaction as a trainable policy for LLM agents","RL-trained summarizer extends context limits for coding agents","Optimize summary generation alongside execution for longer rollouts","Train the summarizer under task rewards to extend agent context","Context compaction trained under task reward improves coding agents"]},"model":"glm-5.2","effort":"high","cost_usd":0.0,"raw_usage":{"total_tokens":1090,"prompt_tokens":620,"completion_tokens":470,"prompt_tokens_details":null},"tokens_in":620,"tokens_out":470,"duration_ms":10586,"temperature":1.0,"reasoning_tokens":461,"cache_read_input_tokens":0,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-07-07T13:40:37.505972+00:00","model_set":{"reader":"glm-5.2"},"falsifier":"If a task requires multiple compaction events and the summary at the first compaction determines success or failure, but cross-trajectory GAE assigns it nearly the same advantage as a later segment, then the credit assignment is miscalibrated and the policy may not learn to improve early summaries.","supporting_citations":[],"review_version":1}