CodeMidas Mines RL Training Tasks Straight From Source Code
CodeMidas builds executable RL environments for coding agents using only source code, no issues or commits, yielding 5,545 tasks from 3,185 codebases across 23 languages that lift performance on issue repair, program construction, and terminal-use benchmarks.
Training a coding agent that actually gets work done was never purely a function of a bigger model or more GPUs. Reinforcement learning needs tasks, and specifically tasks where an agent's output can be checked automatically and reliably as right or wrong — in other words, it needs verifiers.
Without a verifier, no amount of rollout data is anything more than noise. That is precisely the bottleneck a new paper, "CodeMidas: Scaling Agentic Coding RL Environments from Code Itself" (arXiv:2609.22068), sets out to attack: not insufficient compute, but a shortage of the resource that actually gates progress, verifiable coding tasks.
Why issues and commits were never enough
Before CodeMidas, the standard way to turn open-source repositories into RL training tasks was to mine development artifacts: issues, commits, and pull requests, pairing a bug report with the commit that fixed it to produce a task and its verification condition. That approach works, but its ceiling is low, because the overwhelming majority of working, already-implemented code in the world has no linked issue or PR at all.
Relying only on developer-left metadata means discarding the vast majority of the ore in the mine before you even start digging. CodeMidas inverts this: it uses only the source code itself as input, with no dependence on issues, commits, or PRs. Any piece of code that already implements some functionality becomes, in principle, extractable as a task, which expands the addressable pool from "repositories with a paper trail" to "essentially every working open-source codebase."
Agentic compute at every construction stage
CodeMidas spends agentic compute across the whole pipeline for building an environment, not just at training time. First, agents explore the functionality already implemented in a codebase and formulate a behavioral specification describing what that code is supposed to do.
Second, they construct test cases grounded in actual execution of the original code, rather than assertions guessed out of thin air. Third, candidate tasks pass through validation and filtering via execution checks and repeated solution rollouts, weeding out anything whose specification is vague, whose tests are unreliable, or that cannot be reproduced consistently. This willingness to use execution itself to validate whether a task is trustworthy is what lets the whole pipeline scale without quietly degrading quality.
Why breadth is the generalization lever
The resulting dataset spans 5,545 training tasks drawn from 3,185 open-source codebases, across 23 programming languages and 15 technical domains. That breadth is not a cosmetic detail, it is the difference between an agent that merely looks competent on one narrow benchmark and one that has picked up transferable coding skill.
Training on a narrow slice of languages or project shapes invites overfitting to a specific syntax, a specific bug pattern, or a specific repository convention. Spreading tasks across 23 languages and 15 domains forces the underlying skill being learned to be something more general: how to orient inside an unfamiliar codebase and how to check your own work, rather than how to pattern-match one corpus.
What the benchmark gains actually tell us
The team trained the MiMo-V2.5 model on these tasks using GRPO and evaluated it on five benchmarks, with three specific gains reported: DeepSWE, an issue-repair benchmark, improved 11.7%; ProgramBench, a whole-program construction benchmark, improved 17%; and Terminal-Bench v2.1, covering terminal work, improved 8.5%. ProgramBench shows the largest jump, and that lines up neatly with how CodeMidas builds its tasks in the first place: because the pipeline is built around understanding and reproducing complete implemented functionality rather than patching a narrow bug, it is unsurprising that the resulting agent improves most at building things from scratch rather than at narrower repair work.
Ablations further showed that increasing the number of high-quality training tasks kept improving performance, suggesting this approach to manufacturing verifiers from code at scale has room left to run. Trajectory analysis also found that the RL-trained agent exhibited more codebase exploration and more diverse self-verification behavior — meaning what the model picked up was not just how to answer correctly, but something closer to an engineer's habit of orienting before acting and checking after.
Sources
FAQ
What core problem does CodeMidas address?
It tackles the scarcity of verifiable tasks for agentic coding RL: relying only on issues and commits yields too few tasks, so CodeMidas builds executable verification environments directly from source code instead.
How many training tasks did CodeMidas generate, and from what source?
The dataset contains 5,545 training tasks drawn from 3,185 open-source codebases, spanning 23 programming languages and 15 technical domains.
Which benchmarks improved after training with CodeMidas data?
Training MiMo-V2.5 with GRPO improved DeepSWE (issue repair) by 11.7%, ProgramBench (whole-program construction) by 17%, and Terminal-Bench v2.1 (terminal work) by 8.5%.