NTH

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

November 7, 2026 2 min read
Watch on YouTube
The one-line take

CodeSpecWeave creates coding tasks with interacting requirements to train and evaluate agents on more realistic software engineering work.

Key results

4670
CodeSpecWeave training tasks

Tasks generated for reinforcement-learning training.

2865
Repositories

Repositories represented in the training set.

100
CodeSpecWeave-Bench tasks

Manually reviewed benchmark tasks.

1044
Benchmark specifications

Interdependent specifications across CodeSpecWeave-Bench.

62.98%
DeepSWE-v1.1 success rate

MiMo-V2.6-Flash-SFT after CodeSpecWeave reinforcement learning; vanilla baseline was 54.42%.

74.0%
GPT-6 Astra pass rate

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 paper

More in Code Generation

Browse all 52 papers →
01Code Generation

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.

Read analysis