Cross-Benchmark Transfer from RL on Agentic Coding Tasks
cs.LG, cs.AI, cs.SE
Submitted: 2026-10-01
Updated: 2026-10-01
Comments: 15 pages, 2 figures, 4 tables
Code: https://github.com/anthropics/claude-code
Project page: https://www.swe-marathon.org
License: http://creativecommons.org/licenses/by/4.0/
The gist: Coding agents often fail in the last mile: they build most of a feature but drop a requirement, test only the cases their implementation already handles, break behavior that was supposed to stay
Terminology
Abstract
Coding agents often fail in the last mile: they build most of a feature but drop a requirement, test only the cases their implementation already handles, break behavior that was supposed to stay intact, or validate against an unchecked assumption. We ask whether reinforcement learning (RL) on expert-built agentic coding tasks closes this gap, and whether what the agent learns transfers beyond the training distribution. We post-train Kimi K2.7 Code, a 1T-parameter (32B active) open-weight mixture-of-experts model, with RL alone on 1,700 tasks: 1,000 repository tasks graded by hidden fail-to-pass tests and by pass-to-pass tests of existing behavior, and 700 terminal tasks graded by expert-written hidden verifiers. The reward is the fraction of target checks passed and drops to zero if any pass-to-pass test fails. One epoch of GSPO on a rank-32 LoRA adapter improves pass@1 on each of the six external benchmarks we evaluated, across three agent harnesses: SWE-Bench Pro (60.1 to 64.8), DeepSWE (31.0 to 43.4), Terminal-Bench 2.1 (67.4 to 82.0), Terminal-Bench 3 (1.4 to 12.1), Terminal-Bench 4 (0.0 to 7.6), and SWE-Marathon (5.0 to 25.0). Pooled over the five independent task sets (Terminal-Bench 4 revises Terminal-Bench 3), the improvement is significant (p < 0.001), and it remains significant on the three sets released after the training data was collected (p = 0.004); the model also improves under both harnesses never used in training. Median trajectories on DeepSWE and Terminal-Bench 3 are 24-35% shorter in agent steps. The base model's failed DeepSWE runs are mostly near-misses, and on the tasks the trained model newly solves, paired trajectories show it avoiding each of the four failure modes above.
Sources
- SFT Memorizes, RL Generalizes: A Comparative Study of Foundation Model Post-training
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning
- SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?
- SWE-Marathon: Can Agents Autonomously Complete Ultra-Long-Horizon Software Work?
- Rubrics as Rewards: Reinforcement Learning Beyond Verifiable Domains
- LoRA: Low-Rank Adaptation of Large Language Models
- Does Math Reasoning Improve General LLM Capabilities? Understanding Transferability of LLM Reasoning
- DeepSWE: Measuring Frontier Coding Agents on Original, Long-Horizon Engineering Tasks
- R2E-Gym: Procedural Environments and Hybrid Verifiers for Scaling Open-Weights SWE Agents
- SWE-bench: Can Language Models Resolve Real-World GitHub Issues?
- Kimi K2: Open Agentic Intelligence
- Adam: A Method for Stochastic Optimization
- RLTF: Reinforcement Learning from Unit Test Feedback
- Decoupled Weight Decay Regularization
- ComplexConstraints and Beyond: Expert Rubrics for RLVR
- EnterpriseBench Corecraft: Training Generalizable Agents on High-Fidelity RL Environments
- Cross-Benchmark Generalization in Long-Horizon Agents
- Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfaces
- Training Software Engineering Agents and Verifiers with SWE-Gym
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks