Back to AI Research

AI Research

CodeMidas: Scaling Agentic Coding RL Environments f... | AI Research

Key Takeaways

  • CodeMidas: Scaling Agentic Coding RL Environments from Code Itself Training effective AI coding agents requires a vast supply of diverse tasks and reliable w...
  • Training capable coding agents via reinforcement learning (RL) requires diverse tasks with reliable verifiers.
  • Open-source codebases offer a rich source of such tasks, while existing methods typically rely on development artifacts such as issues and commits, limiting the range of tasks that can be extracted.
  • To better scale RL environments, we 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.
  • The resulting dataset has 5,545 training tasks from 3,185 open-source codebases spanning 23 programming languages and 15 technical domains.
Paper AbstractExpand

Training capable coding agents via reinforcement learning (RL) requires diverse tasks with reliable verifiers. Open-source codebases offer a rich source of such tasks, while existing methods typically rely on development artifacts such as issues and commits, limiting the range of tasks that can be extracted. To better scale RL environments, we 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. CodeMidas allocates agentic compute to every stage of environment construction: agents explore implemented functionality to formulate behavioral specifications, construct tests grounded in execution of the original code, and validate and filter candidate tasks through execution checks and repeated solution rollouts. The resulting dataset has 5,545 training tasks from 3,185 open-source codebases spanning 23 programming languages and 15 technical domains. Training MiMo-V2.5 on these tasks with GRPO improves performance on all five diverse benchmarks, covering issue repair (DeepSWE + 11.7%), whole-program construction (ProgramBench +17%), and terminal work (Terminal-Bench v2.1 +8.5%). Ablations show that increasing the number of high-quality training tasks improves performance. Trajectory analysis shows the RL-trained agent demonstrates better behaviors like increasing codebase exploration and more diverse self-verification. These results establish source code as a scalable foundation for constructing RL environments that improve coding agents across diverse software tasks.

CodeMidas: Scaling Agentic Coding RL Environments from Code Itself
Training effective AI coding agents requires a vast supply of diverse tasks and reliable ways to verify if the agent’s work is correct. Traditionally, researchers have relied on human-written records like bug reports, pull requests, or existing test suites to create these training environments. However, these sources are limited in scope. CodeMidas introduces a new, automated pipeline that bypasses these limitations by using raw source code as the sole input to generate executable reinforcement learning (RL) environments, allowing for the creation of high-quality training tasks at a much larger scale. The ai agents story also surfaces in Andrew Ng Launches OpenWorker to Deliver..., adding another angle.

Turning Code into Training Tasks

CodeMidas treats existing open-source codebases as a foundation for learning. The pipeline uses an agentic process to identify functional parts of a codebase, such as command-line tools or library functions, and then automatically constructs a task around them. This involves removing the original implementation to create a "blank slate" for the AI to solve, while simultaneously generating behavioral specifications and tests that are grounded in the original code's execution. By doing this, the system ensures that the tasks are realistic and that the resulting verifiers are trustworthy.

Ensuring Quality Through Rigorous Filtering

Because automated task generation can sometimes produce flawed or "leaky" environments—where the solution is too easy to find or the tests are inaccurate—CodeMidas employs a multi-stage filtering process. This includes adversarial rollouts, where the system tries to "cheat" to see if the task is too simple, and solution reviews that compare the agent’s output against the intended requirements. By performing these checks, the pipeline ensures that only high-quality, verifiable tasks are included in the final training set, which consists of 5,545 tasks across 23 programming languages. The ai agents story also surfaces in Claude autonomously improved models across 10..., adding another angle.

Performance Gains and Agent Behavior

When the MiMo-V2.5 model was trained on this dataset using reinforcement learning, it showed significant performance improvements across five diverse benchmarks. These gains covered a wide range of software engineering activities, including fixing issues, building entire programs, and performing terminal-based tasks. Beyond just higher scores, analysis of the agents' behavior showed that training on CodeMidas led to more effective strategies, such as deeper exploration of the codebase and more frequent, diverse self-verification during the coding process.

The Importance of Data Quality

A key finding from the research is that the quality of the training data is just as important as the quantity. When comparing the curated CodeMidas dataset against a larger, uncleaned "vanilla" set of tasks, the smaller, high-quality pool consistently led to better performance. This suggests that the effort spent on cleaning, validating, and filtering the environments is a critical component in successfully training capable coding agents, proving that source code itself is a scalable and powerful resource for advancing AI software engineering. The ai agents story also surfaces in Moonshot AI and kvcache-ai Open Source..., adding another angle. as detailed in the full paper on Arxiv

Comments (0)

No comments yet

Be the first to share your thoughts!