---
title: "Xiaomi's CodeMidas Turns Open-Source Code Into AI Training Tasks"
subtitle: "A new research pipeline called CodeMidas builds reinforcement learning environments straight from source code, boosting coding agent scores on five benchmarks."
url: "https://alphasignal.ai/news/xiaomi-s-codemidas-turns-open-source-code-into-ai-training-tasks"
author: "AlphaSignal Newsroom"
author_url: "https://alphasignal.ai/editorial-team"
company: "AlphaSignal"
company_url: "https://alphasignal.ai/company/alphasignal"
published: "2026-09-18T17:55:17.000Z"
updated: "2026-09-25T00:06:23.812Z"
type: "Paper"
topics:
  - "Development"
  - "Agents"
subtopics:
  - "Code Agents"
  - "Code Agents"
  - "Agent Frameworks"
upvotes: 796
source_url: "https://arxiv.org/abs/2609.22068"
comments: 0
truncated: true
---

# Xiaomi's CodeMidas Turns Open-Source Code Into AI Training Tasks

> A new research pipeline called CodeMidas builds reinforcement learning environments straight from source code, boosting coding agent scores on five benchmarks.

Researchers from Peking University, the University of Hong Kong, Renmin University, and Xiaomi’s LLM Core group have introduced CodeMidas, a pipeline that converts open-source repositories into verifiable training environments for coding agents. According to the [CodeMidas paper](https://arxiv.org/abs/2609.22068), the method works directly from executable source code, without requiring issue trackers, commit histories, documentation, or existing tests. Training on the resulting tasks improved Xiaomi’s MiMo-V2.5 model across five software-engineering benchmarks.

## Source code becomes the task generator

Reinforcement learning can improve coding agents when each task includes a dependable verifier that scores a proposed solution. Building those environments is difficult because the task must be realistic, reproducible, challenging, and paired with tests that reject incorrect implementations without penalizing valid alternatives.

Existing data pipelines often derive tasks from issues, pull requests, commits, or test suites. Those requirements restrict training data to repositories with detailed development records and favor bug-fix tasks that resemble historical patches.

CodeMidas treats an implemented public interface as the starting specification. The original implementation acts as an oracle: agents execute it to collect expected behavior, remove its core logic, and preserve the surrounding repository as a realistic scaffold with dependencies, configuration, and related modules intact.

## Four gates from repository to reward

Large language model agents handle most of CodeMidas’s environment construction, including repository exploration, specification writing, test generation, execution checks, and adversarial review. The workflow has four stages:

_Preview only. Full text requires an AlphaSignal Pro account._

## Sources

- [CodeMidas: Scaling Agentic Coding RL Environments from Code Itself](https://arxiv.org/abs/2609.22068)
- [CodeMidas (HTML version)](https://arxiv.org/html/2609.22068v1)
- [Hugging Face paper page](https://huggingface.co/papers/2609.22068)
- [MiMo-V2.5](https://mimo.xiaomi.com/mimo-v2-5)
