Fewer but better RL tasks beat more of them for training coding agents
on: CodeMidas: Scaling Agentic Coding RL Environments from Code Itself
The central bet in CodeMidas is that you don't need issue trackers, pull requests, or documentation to build RL training tasks for coding agents — source code alone is enough. The system takes an existing codebase, identifies functionality with observable public interfaces, removes the implementation, and builds a verifiable task around the gap. Agents do the heavy lifting at every stage: exploring the codebase to write behavioral specifications, running the original code to ground test assertions, and then probing finished environments for leakage or flawed verifiers before any task reaches training.
The resulting dataset covers 5,545 tasks drawn from 3,185 open-source codebases across 23 programming languages and 15 technical domains. Python, TypeScript, and Go together account for roughly half the tasks; systems software, web technologies, and developer tools make up the largest domain slice. Reference patches have a median size of 142 lines, and nearly two-thirds of tasks touch at least two source files — these are not toy function completions.
Training MiMo-V2.5 on these tasks with GRPO produces gains across five external benchmarks that span genuinely different kinds of software work: issue repair, whole-program construction, code translation, and terminal interaction. DeepSWE pass rate roughly doubles, from 10.0% to 21.7%. ProgramBench's Almost Solved score jumps from 4.5 to 21.5. Terminal-Bench v2.1 improves from 63.7% to 72.2%.
The quality-versus-quantity comparison is the most instructive part of the ablation. A filtered set of roughly five thousand tasks beats an unfiltered set of approximately eight thousand on every evaluated benchmark. Even a filtered subset of three thousand outperforms the larger unfiltered pool. The filtering chain — execution consistency checks across six fresh containers, adversarial leakage probes, solution-review passes for verifier correctness, and rollout outcome filtering — is doing real work, not just trimming noise.
Behavioral analysis during training shows agents making more read and search calls before their first edit, drafting more code in reasoning before writing it, and issuing more distinct verification commands after finishing edits. Rollouts that include agent-written checks show a mean pass rate about 4 percentage points higher than those without, with a confidence interval that stays positive. These behavioral shifts also appear on held-out benchmarks the model was never trained on, which is the kind of generalization evidence that makes the benchmark numbers more credible rather than less.
The one thing the paper doesn't resolve is how far this approach scales before the quality of agent-generated specifications becomes the bottleneck. Every stage of environment construction relies on the same class of model being trained, and the filtering steps catch defects after the fact rather than preventing them. That's a reasonable engineering choice given the alternative, but it means the ceiling on task quality is tied to the ceiling on the constructing agent's judgment.
Filtered source-code-derived tasks beat a larger unfiltered set — quality of RL environments matters more than raw count.
Sources & links
Related on SkillFed
STEVE retrieves from a fixed 210-skill Minecraft library instead of generating code per task, mining diamonds 2.5x faster than Voyager and reaching the hardest tech tier in every…
MCE evolves the context-engineering skill itself, not just the context it produces — beating ACE and GEPA by up to 54% (mean 16.9%) across five domains, while training 13.6x…