When Requirements Interact: Scaling Long-Horizon Coding via Interdependent Specifications
AuthorsYishuo Cai, Minzheng Wang, Liang Zhao, Linghao Zhang, Lei Li, Shicheng Li, Xu Sun, Fuli Luo
AffiliationsLLM Core, Xiaomi · Peking University · University of Hong Kong
CodeSpecWeave creates coding tasks with interacting requirements to train and evaluate agents on more realistic software engineering work.
Key results
Tasks generated for reinforcement-learning training.
Repositories represented in the training set.
Manually reviewed benchmark tasks.
Interdependent specifications across CodeSpecWeave-Bench.
MiMo-V2.6-Flash-SFT after CodeSpecWeave reinforcement learning; vanilla baseline was 54.42%.
Highest reported result on CodeSpecWeave-Bench.
What the paper found
CodeSpecWeave targets a weakness in long-horizon coding agents: requirements such as compatibility, error recovery, and state consistency often interact, so satisfying each in isolation can still produce a broken implementation. Its synthesis agent starts from real developer requirements and jointly develops coupled task specifications and executable tests; a review agent examines solutions and execution traces from multiple models to catch tests that miss defects or reject valid alternatives. The resulting training set contains 4670 tasks across 2865 repositories, and CodeSpecWeave-Bench contains 100 tasks with 1044 specifications. Using GRPO reinforcement learning, MiMo-V2.6-Flash-SFT improved its DeepSWE-v1.1 success rate from 54.42% to 62.98%; on CodeSpecWeave-Bench, it reached 70.67%, compared with 59.00% before training. The benchmark also distinguishes leading commercial agents: OpenAI’s GPT-6 Astra achieved 74.0%, while the evaluation included Anthropic’s Claude Opus 5 and Xiaomi’s MiMo models. Overall, the results suggest that training on tightly coupled engineering constraints helps agents coordinate changes across code, tests, and repository state rather than treating requirements as a checklist.
Original abstract
To succeed in real-world long-horizon software development, coding agents must satisfy multi-dimensional task specifications, such as interface compatibility and error handling, and do so without breaking existing dependencies. However, current works lack specification in both quantity and diversity, often emphasizing primary goals while ignoring complex constraints. Synthesizing tasks to bridge this gap presents two challenges: naively adding specifications risks reducing tasks to trivial checklists rather than compelling joint reasoning, and verifying these subtle interactions risks overlooking hidden flaws or rejecting valid alternatives. To address these challenges, we introduce CodeSpecWeave, a framework for synthesizing tasks with rich, interdependent specifications. Grounded in real developer seeds, a synthesis agent iteratively develops both coupled task requirements and executable tests, while a review agent audits solution trajectories from multiple models to guarantee test reliability. Using this pipeline, we construct 4,670 training tasks across 2,865 repositories. Applying Reinforcement learning on these tasks significantly improves performance over the base model on DeepSWE-v1.1, largely outperforming existing baselines. Furthermore, we curate CodeSpecWeave-Bench, a rigorous benchmark comprising 100 tasks and 1,044 specifications, which clearly separates frontier models and reveals significant headroom in handling interdependent engineering constraints.
Read the original paperMore in Code Generation
Browse all 52 papers →CompoundingKernel: Self-Improving from Zero to First
Qian Qu, Hongyang Wang, Wenbo Chen, Yichuan Li, Jingguo Liu, Xian Li, Xuan Wang, Ruochen Wen, Leo Fan, Yiming Yan, Zheshen Wang, Benoit Dumoulin
CompoundingKernel uses parallel agents and an archive of successful attempts to discover fast, correct GPU kernels.
CoReMem: Cost-Internalizing Memory for Successive Coding Tasks with Prospective Valuation
Peiwen Li, Harshit Verma, Sophia Zhou, Haiwen Wang, Ngoc Bui, Heng Chang, Fei Fei, David van Dijk, Rex Ying
CoReMem helps coding agents carry forward useful repository knowledge while accounting for the cost of writing and using memory.
From Repositories to Training Environments: Scaling Long-Horizon Coding Agents with Environment Evolution Loop
Yang Tian, Tianyu Zheng, Xiyuan Yang, Yaxin Du, Chengran Yang, Bo Zhao, Jian Yang, Bryan Dai
RepoFactory turns real software repositories into training environments and iteratively improves them to help coding agents tackle longer, more realistic projects.