Researchers have introduced CodeMidas, an agentic pipeline designed to scale the construction of reinforcement-learning (RL) environments for coding agents by using source code itself as the only task-specific input. The work is published as a paper on Hugging Face.
According to the paper, training capable coding agents with RL demands diverse tasks paired with reliable verifiers. While open-source codebases are a rich source of such tasks, existing approaches typically depend on development artifacts such as issues and commits, which restricts the variety of tasks that can be extracted. CodeMidas instead targets implemented functionality already present in codebases.
The pipeline allocates agentic compute across every stage of environment construction: agents explore implemented functionality to formulate behavioral specifications, build tests grounded in execution of the original code, and validate and filter candidate tasks through execution checks and repeated solution rollouts.
The resulting dataset contains 5,545 training tasks drawn from 3,185 open-source codebases, spanning 23 programming languages and 15 technical domains. Training MiMo-V2.5 on these tasks with GRPO improved performance on all five benchmarks evaluated, including issue repair (DeepSWE +11.7%), whole-program construction (ProgramBench +17%), and terminal work (Terminal-Bench v2.1 +8.5%).
Ablations indicate that increasing the number of high-quality training tasks improves performance, while trajectory analysis shows the RL-trained agent exhibits better behaviors, such as greater codebase exploration and more diverse self-verification. The authors position source code as a scalable foundation for building RL environments that enhance coding agents across varied software tasks.