Coding agents improve long task handling with complex rules
When Requirements Interact: Scaling Long-Horizon Coding via Interdependent Specifications
Software EngineeringComputation and Language
Summary
Software development often requires meeting many important rules at once, like making sure parts fit together and errors are handled properly. Current methods usually only focus on one main goal and miss these tricky rules. The authors created a system called CodeSpecWeave that helps generate tasks combining many connected rules and checks solutions carefully. This system helped improve coding agents' abilities on a big set of tasks and made a new, tough benchmark to test these skills. Their work shows better ways to train software tools to handle complicated programming needs.
What this means in practice
- •For software development teams: Improve automated code generation tools to handle complex, interdependent coding requirements and reduce bugs in long development cycles.
- •For software quality assurance teams: Use the CodeSpecWeave benchmark to rigorously test coding tools across multiple interacting specifications and catch subtle errors earlier.
- •For automated software tool vendors: Create advanced coding assistants with enhanced ability to satisfy multiple interconnected specifications, offering better coding support to clients.$Commercial implications: This paper enables vendors to build smarter AI coding tools that meet complex real-world developer requirements, improving product marketability.
Authors
Yishuo Cai, Minzheng Wang, Liang Zhao, Linghao Zhang, Lei Li, Shicheng Li, Xu Sun, Fuli Luo
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.