When Requirements Interact: Scaling Long-Horizon Coding via Interdependent Specifications

Yishuo Cai, Minzheng Wang, Fuli Luo and colleagues (LLM Core at Xiaomi, with Peking University and the University of Hong Kong) introduce CodeSpecWeave, a framework that synthesizes executable coding tasks with interdependent specifications for RL training and benchmarking.
Ask this paper
Training gain. RL on CodeSpecWeave raises MiMo-V2.5 from 12.39% to 25.30% on DeepSWE-v1.1 and MiMo-V2.6-Flash-SFT from 54.42% to 62.98%.
Task pipeline. Specification seeds come from commits, issues and pull requests. A synthesis agent refines requirements and tests together, and a review agent audits solutions from several models to catch verification errors.
Dataset scale. The training set has 4,670 tasks across 2,865 repositories, and each task runs in its own container in a Kubernetes pod.
Benchmark. CodeSpecWeave-Bench has 100 tasks and 1,044 specifications. Pass rates run from 44.0% to 74.0%, and GPT-6 Astra leads at 74.0% with the lowest mean output length at 17.2k tokens.
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.