CODESPECWEAVE / RESEARCH 2026

When
requirements
interact.

Scaling Long-Horizon Coding
via Interdependent Specifications

Real software is a web of constraints. We build training environments that teach coding agents to reason across them.

+ INDEPENDENT RULES → SHARED DECISIONS
interface compatibility
state consistency
error recovery
execution order
functional semantics
✳One coherent
implementation.
Yishuo Cai1,2,*‡Minzheng Wang1,*Liang Zhao1Linghao Zhang1Lei Li1,3Shicheng Li1Xu Sun2,†Fuli Luo1,†
1 LLM Core, Xiaomi2 Peking University3 University of Hong Kong

* Equal contribution † Corresponding authors‡ Work done during an internship at Xiaomi

4,670.executable training tasks
2,865.real-world repositories
100.held-out benchmark tasks
1,044.benchmark specifications
01 THE CORE IDEA

One change.
Many consequences.

A new feature can change state, break an interface, or alter an error path. Our tasks connect these requirements, making joint reasoning essential.

EXPLORE A REAL TASKskycoin / skycoin

Share fairly. Stay compatible.

Allocate transaction coin hours across multiple recipients,
while preserving the existing single-recipient behavior.

SHARED DECISION SPACE3 connected requirements
Requirements share one transaction builder. Select a requirement to see its connections. Proportionality Change allocation Minimum allocation Output order Compatibility transactionbuilder
THE INTERACTION

A fair split needs a shared policy.

Allocate hours in proportion to coin amounts. This decision must also respect minimum allocations and deterministic rounding in request order.

A locally correct ratio is not enough to satisfy the whole transaction contract.

We weave requirements around shared state, execution paths, and lifecycle constraints—so implementation decisions have to work together.

02 THE FRAMEWORK

From real requirements
to reliable environments.

A synthesis agent builds coupled tasks and executable tests. Multi-model trials and trajectory review check whether the tests reward the right behavior.

01 / GROUND⌘

Start with real engineering.

Extract and deduplicate developer requirements into a reference of specification patterns.

REAL REPOSITORIES · REAL CONSTRAINTS
02 / SYNTHESIZE↔

Weave tasks with tests.

Connect requirements through shared decisions. Co-develop each task and its verifier in the repository.

ITERATIVE SYNTHESIS · EXECUTABLE FEEDBACK
03 / VALIDATE⤴

Test the tests.

Review solver trajectories for false positives and false negatives. Repair selected tasks and rerun checks.

MULTI-MODEL REVIEW · REVALIDATION
⌁ See the complete synthesis & validation pipeline+
Paper pipeline: task and verifier synthesis, baseline check, solver trials, difficulty filtering, trajectory review, and repair followed by revalidation.
Original method figure from the paper. Task requirements and test cases have many-to-many coverage.
03 TRAINING RESULTS

Better environments.
Stronger coding agents.

Reinforcement learning on CodeSpecWeave improves both MiMo backbones, with the largest gains on demanding long-horizon engineering tasks.

MODEL BACKBONE
EVALUATE ON
DeepSWE-v1.1
+8.56pp

with CodeSpecWeave RL

BASE MODEL54.42%+ CODESPECWEAVE62.98%
Training settingSuccess rate 0–100%ScoreΔ vs. base
Base model · pp = percentage pointsFull results table ↓

Paper Table 2 · three samples per task · 512K context

Full results across four benchmarks+
Task success rates (%). Average is the unweighted mean of the four benchmarks; best values within each backbone are bold.
Training dataCodeSpecWeave-BenchDeepSWE-v1.1SWE-bench VerifiedSWE-bench ProAverage
01

Gains on both backbones. Highest four-benchmark average among the compared training datasets.

02

Transfer to long-horizon work. DeepSWE-v1.1 improves from 12.39% to 25.30% on MiMo-V2.5.

03

More sustained verification. Flash-SFT edit–test loops increase from 2.96 to 4.90 per trajectory.

04 CODESPECWEAVE-BENCH

How well do frontier agents
hold it all together?

100 tasks. 100 repositories. 1,044 specifications.
A benchmark for engineering changes that satisfy the entire contract.

HIGHEST REPORTED PASS RATE
74.0%

GPT-6 Astra · Codex

PERFORMANCE SPREAD
30.0pp

74.0% to 44.0% across configurations

Frontier model comparison

Reported pass rates across 10 model–framework configurations
Click column headers to sort
Model and agent framework results from the paper. Bars share a 0 to 100 percent scale. Gap is percentage points below the overall leader, GPT-6 Astra at 74.0 percent.
#Agent frameworkGap to best

Paper frontier comparison. Colors identify agent frameworks; configurations use different frameworks. These scores are separate from the three-sample RL evaluation above. Gap is measured against GPT-6 Astra’s reported 74.0%.

Cite this work

Download BibTeX
@misc{cai2026requirementsinteractscalinglonghorizon,
      title={When Requirements Interact: Scaling Long-Horizon Coding via Interdependent Specifications},
      author={Yishuo Cai and Minzheng Wang and Liang Zhao and Linghao Zhang and Lei Li and Shicheng Li and Xu Sun and Fuli Luo},
      year={2026},
      eprint={2610.40256},
      archivePrefix={arXiv},
      primaryClass={cs.SE},
      url={https://arxiv.org/abs/2610.40256},
}