Xiaomi CodeMidas mines 5,545 RL tasks from source code; DeepSWE jumps 10.0% to 21.7%

CodeMidas: Scaling Agentic Coding RL Environments from Code Itself

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

cs.AI

2026-09-19

CodeMidas builds 5,545 coding RL tasks from source code alone. MiMo-V2.5 DeepSWE rises 10.0% to 21.7%; ProgramBench Almost Solved rises 4.5 to 21.5.

What problem this solves

RL for coding agents needs diverse tasks and trustworthy rewards. Most existing pipelines are glued to development artifacts: issues, PRs, commits, written tests, or docs. Whatever those records cover, the task pool covers. Open-source repos contain far more implemented, executable functionality than those traces record.

CodeMidas takes a strict stance. The only task-specific input is source code. Implemented behavior becomes a development starting point with the core deleted and a hidden verifier, using execution of the original code as the test oracle.

Method

Four agentic stages.

The retained set has 5,545 tasks from 3,185 codebases across 23 languages and 15 domains. Median reference patch is 142 lines; 65.9% touch at least two source files. Python, TypeScript, and Go are 21.4%, 18.3%, and 16.2%.

Training uses MiMo-V2.5 with GRPO, binary execution rewards, batch 32, and 32 rollouts per task. The verifier is injected only at grading.

Results

All five external benchmarks rise versus the initial policy (percentage points):

BenchmarkMetricInitialAfter RLGain
SWE-bench Propass rate50.354.4+4.1
DeepSWE v1.1pass rate10.021.7+11.7
ProgramBenchAlmost Solved4.521.5+17.0
RepoZero C2Rustpass rate40.551.8+11.3
Terminal-Bench v2.1pass rate63.772.2+8.5

Held-out CodeMidas Val (200 tasks) goes from 35.0% to 44.7%. On high-quality 1k / 3k / full 5,545 pools, DeepSWE is 17.57 / 19.05 / 21.70 and Val is 41.30 / 43.22 / 44.73. The full set beats an unfiltered 8k sample by 0.59 / 4.59 / 4.49 points on Pro / DeepSWE / Val; even the clean 3k pool beats that 8k.

Late in training, pre-edit read/search calls rise from 27.2 to 40.1, the drafting ratio from 0.36 to 0.63, and distinct post-edit checks from 2.03 to 2.53. Within the same task and checkpoint, rollouts where the agent writes and runs its own checks pass 4.2 points more often. Similar behavioral shifts show up on SWE-bench Pro, ProgramBench, and Terminal-Bench.

Why it matters

The data bottleneck for coding RL does not have to wait for GitHub issues. Runnable open-source features already supply a spec plus a reference solution. Cleaning beats raw volume: 3k filtered tasks beat 8k dirty ones. What transfers is not only issue repair, but more repo exploration and more varied self-checks, including on from-scratch programs and terminal work.

For teams cloning SWE-bench, this is a wider seam. The cost is a heavy construction pipeline: every task needs execution consistency and multiple screening rollouts.

Limitations

Tasks can only be cut from functionality that already exists. Tests grown from original execution can still be too tight or too loose; a reviewer agent flags mismatches, but there is no large human audit of oracles. Dropping all-pass and all-fail tasks may throw away both trivial and genuinely hard items. Only MiMo-V2.5 was trained. The compute bill for filtering is not quoted separately.

Terms

Source

Related papers

All paper explainers