CodeMidas: Scaling Agentic Coding RL Environments from Code Itself
- Field: Machine Learning
- Authors: Bowen Ye, Lei Li, Shicheng Li, Zihao Yue, Linghao Zhang, Hanglong Lv, Yuanxin Liu, Wenhan Ma, Hao Tian, Rang Li, Jinhao Dong, Yikai Zhao, Xiangwei Deng, Hailin Zhang, Liang Zhao, Qi Liu, Lingpeng Kong, Tong Yang, Fuli Luo
- Published: 2026-09-18
- arXiv: 2609.22068
- Issue resolution (DeepSWE): +11.7%
- Full program construction (ProgramBench): +17%
- Terminal operation (Terminal-Bench v2.1): +8.5%
- Ablation studies show that increasing the number of high-quality training tasks improves performance.
- Trajectory analysis reveals that RL-trained agents exhibit better behaviors, such as more repository exploration and more diverse self-verification.
- These results establish source code itself as a scalable foundation for building RL environments that comprehensively improve coding agent performance.
Overview
Training capable coding agents via reinforcement learning (RL) requires diverse tasks with reliable verifiers. Open-source codebases offer a rich source of such tasks, but existing methods typically rely on development artifacts such as issues and commits, limiting the range of extractable tasks. To better scale RL environments, the authors present CodeMidas, an agentic pipeline that turns implemented functionality in existing codebases into executable RL environments using source code as its only task-specific input.
How It Works
CodeMidas allocates agentic compute to every stage of environment construction:
1. Agents explore implemented functionality to formulate behavioral specifications. 2. Agents construct tests grounded in execution of the original code. 3. Candidate tasks are validated and filtered through execution checks and repeated solution rollouts.
Results
The resulting dataset contains 5,545 training tasks from 3,185 open-source codebases, spanning 23 programming languages and 15 technical domains. Training MiMo-V2.5 with GRPO on these tasks yields improvements across all five diverse benchmarks: