AI
New system converts code repository changes into training tasks for AI coding agents
Change2Task automates the creation of realistic coding tasks from pull request history, enabling large-scale training and evaluation of AI agents that write code.
Training and evaluating AI coding agents at scale demands a steady stream of high-quality, realistic tasks paired with proper execution environments. Researchers have introduced Change2Task, a system designed to automatically generate such tasks by mining repository histories and converting merged pull requests into verified coding challenges on current versions of the same codebase.
How it works#
The system takes merged pull requests—actual code changes made by developers—and works backward to reconstruct realistic task states. Rather than requiring manual setup for each scenario, Change2Task employs three techniques to rebuild environments: Patch Reversal (undoing changes to recreate the starting state), Code Mapping (aligning old code with modern versions), and Agent Reconstruction (having AI rebuild the initial conditions). Each generated task is then validated to ensure it can be performed from a clean baseline and successfully restored afterward.
Verified results across task types#
The researchers evaluated their approach on five categories of coding work: bug fixes, feature additions, test generation, API migrations, and security repairs. Starting with 1,130 eligible changes from repository histories, Change2Task achieved a 79.6% success rate in producing verified tasks. On a comparable set of candidates, the system recovered 29.2% more usable tasks than a baseline method based directly on pull requests.
In side-by-side testing, tasks reconstructed from historical changes and those built by the system showed 89.7% agreement in how AI agents performed on them, suggesting strong consistency. Additionally, reusing modern repository bases across multiple tasks cut overall pipeline costs by 10.8% compared to building isolated environments for each task.
Real-world deployment#
The findings rest on extensive analysis including four separate studies examining construction stages, code review consistency, branch alignment, and resource trade-offs. An industrial pilot further validated the approach by generating 1,000 tasks from private company pull request histories and testing four language models on a fixed 500-task evaluation set.

