Coding agents building whole libraries

NL2Repo-Pro.

Can a frontier agent build a real library from a spec?

NL2Repo-Pro gives an agent a layered specification and asks it to build a library from scratch, offline and without seeing the tests. Tests from the original repository then grade the result feature by feature.

Paper (soon)CodeData

▶ Watch the videoSee the results

150
tasks
5
languages
14
project types
74K
lines in the median library

The result

61.7
Claude Opus 5.5 in Claude Code
47.1
GPT-6.1 Sol in Codex
37.7
DeepSeek V4.1 Flash in Claude Code
22.5
Grok 4.7 in Claude Code

Feature Acceptance Rate on 150 tasks, the share of a library's features whose tests all pass. We call it the feature score.

NL2Repo-Pro in 95 seconds. The numbers on screen come from the same data as this page.
A task runs from a layered requirements specification, through an agent run with subagents, to grading by feature.
Fig. 1. A task and its grading. A test counts for every feature it calls directly, and a feature is accepted only when all of its tests pass: here 87% of the graded tests pass, yet only 32 of 64 features are accepted. The example is illustrative, and task files call a feature a capability and a layer a group.

01 / The problem

From fixing an issue
to building a library.

Coding agents now work for hours on a single task, and benchmarks have moved from fixing an issue to building whole repositories. A production library is harder again. Its requirements no longer fit in one document, and its features build on one another. One verdict on the whole task says little about how much of the library works. NL2Repo-Pro tests agents on this harder job. Among benchmarks that build production-scale repositories from scratch, we found none whose main score counts features accepted by the original tests.

Table 1. Lines per task, as each benchmark reports them: lines changed when fixing an issue, and lines of the target when building a repository or program. Values are medians unless marked. For NL2Repo-Bench the value is the size band that holds the median.
BenchmarkTaskLines per taskScore unitTasksLanguages
SWE-benchFix an issue33 (mean)Task2,2941
SWE-Bench ProFix an issue107 (mean)Task1,8654
NL2Repo-BenchBuild a repository1.5K to 4KTests1041
MirrorCodeRebuild a program5.9KTask256
E2E-SWEBuild a repository7.4KTask18611
NL2Repo-ProBuild a repository74KFeature1505

02 / The benchmark

A task is
a whole library.

NL2Repo-Pro has 150 tasks in Python, Go, Rust, Java and JavaScript, drawn from real repositories such as pocketbase, sqlglot, trimesh and freqtrade. Each task's specification splits the library into features and orders them by dependency. The agent gets up to ten hours, no network and no view of the tests.

We check every task before release. The original code passes every graded test, while an empty workspace and a version with empty function bodies score zero. The specification gives the interface the tests call directly and lists the other names they use. Engineers who work in the task's language review each task.

Frontier agents do not finish these libraries yet. Claude Opus 5.5 uses a median of 2.8 million output tokens and gets every feature accepted on 7 of 150 tasks. With one run per task, none of the other three systems does so on any task.

Table 2. Size of a task, median over 150 tasks.
Graded features44
Dependency layers9
Specification tokens180K
Graded tests750
Lines in the original library74K
Source files in the original library230
16.3M
lines of source
49,235
source files
10,235
graded features
204,101
graded tests

Type

Scientific computing: 20 tasksWeb & networking: 16 tasksDocuments & data formats: 14 tasksAgent frameworks & infrastructure: 13 tasksCoding agents & tooling: 13 tasksDatabases & data management: 11 tasksFinance & blockchain: 10 tasksDeveloper tools & compilers: 10 tasksSecurity: 9 tasksIoT, embedded & robotics: 8 tasksGraphics, media & desktop: 8 tasksCloud & infrastructure: 7 tasksMachine learning: 6 tasksResearch & productivity agents: 5 tasks
  • Scientific computing2013%
  • Web & networking1611%
  • Documents & data formats149%
  • Agent frameworks & infrastructure139%
  • Coding agents & tooling139%
  • Databases & data management117%
  • Finance & blockchain107%
  • Developer tools & compilers107%
  • Security96%
  • IoT, embedded & robotics85%
  • Graphics, media & desktop85%
  • Cloud & infrastructure75%
  • Machine learning64%
  • Research & productivity agents53%

Lines of source per task

250K+12
100–250K42
50–100K50
25–50K27
10–25K15
<10K4

Language

Python70
Go20
Rust20
Java20
JavaScript20

Repository created

2020 or earlier59
2021 to 202322
2024 to 202525
202644
Fig. 2. Totals across all 150 tasks, then the tasks by type, size of the original library, language and the year the repository was created.

03 / The results

Feature scores show
what is left to build.

7 / 150Best result: tasks with every feature accepted.

One failing test rejects a feature, so the feature score shows how much of each library is done. It also tells apart strong systems that test pass rates blur: on the 32 tasks where Claude Opus 5.5 and GPT-6.1 Sol both pass at least 95% of the graded tests, their test pass rates differ by 1.7 points and their feature scores by 16.2.

Table 3. Results on 150 tasks, one run per system (a model in its harness): Claude Opus 5.5, GPT-6.1 Sol, DeepSeek V4.1 Flash and Grok 4.7. For GPT-6.1 Sol this is the first of its five runs. Core features are those that engineers labeled as substantial to implement.
OpusSolDeepSeekGrok
Feature score61.747.137.722.5
Core feature score51.837.425.514.0
Tasks scoring 80 or higher451174
Tasks with every feature accepted7000

Few libraries get finished, and the four systems rank in the same order in all five languages. Scores spread across the range, and the lead varies by task: Claude Opus 5.5 scores higher on 105 tasks and GPT-6.1 Sol on 32.

Feature scores also show where Claude Opus 5.5 and GPT-6.1 Sol differ. GPT-6.1 Sol trails overall, yet it gets 659 features accepted that Claude Opus 5.5 does not. None of the four systems gets 2,972 of the 10,235 features (29.0%) accepted.

Claude Opus 5.5

130–191920–393240–594160–793880–997100

GPT-6.1 Sol

170–193420–395540–593360–791180–990100

DeepSeek V4.1 Flash

350–194920–394540–591460–79780–990100

Grok 4.7

820–194420–391740–59360–79480–990100
Fig. 3. Number of tasks in each feature score band, out of 150.

04 / How they work

Four systems,
different ways of working.

In Claude Code, Claude Opus 5.5 runs like a coordinator: a median of 25 subagents, a shared plan file in 93% of runs, and a main agent that writes code itself in 14%. In Codex, GPT-6.1 Sol works alongside three subagents, as many as its harness runs at once, and its main agent writes code in every run. DeepSeek V4.1 Flash and Grok 4.7, both in Claude Code, lie between the two: they spawn 13 and 8 subagents, and their main agents write code in 87% and 88% of runs.

Table 4. How the four systems work, medians per run unless marked. Input tokens count context each time it is sent. Shares of runs are taken over the runs in which a behavior could be judged.
OpusSolDeepSeekGrok
Cumulative input tokens192.1M65.1M518.7M85.1M
Output tokens2.8M308K2.1M634K
Subagents253138
Runs with a shared plan file93%4%38%53%
Runs where the main agent writes code14%100%87%88%
Test commands1308100
Source lines written50.4K13.7K46.1K26.9K
Source size, share of the original library70%18%59%36%

05 / Memory

The lead narrows
on newer repositories.

+22.2 to +7.3Score lead, from repositories of 2020 or earlier to those created in 2026.

Memory sets Claude Opus 5.5 apart. On repositories from 2020 or earlier, a median of 50% of the code it writes matches the original library line for line, against 15% to 19% for the other three systems. In 32% of runs, Claude Opus 5.5 rewrites some of the original tests from memory to check its own work. Its lead over GPT-6.1 Sol is widest on older repositories and much smaller on those created in 2026, and it shrinks from both sides: Claude Opus 5.5 scores lower on the newest repositories, while the other three systems score higher.

Table 5. Feature scores by the year the repository was created, the lead of Claude Opus 5.5 over GPT-6.1 Sol, and the median line-for-line overlap with the original, for Claude Opus 5.5 and as a range over the other three systems. Overlap is measured after both codebases are formatted with the same standard tool.
CreatedTasksOpusSolDeepSeekGrokLeadOpus overlapOthers’ overlap
2020 or earlier5966.344.133.019.3+22.250.4%14.6–19.2%
2021 to 20232265.946.440.121.8+19.530.0%11.8–19.0%
2024 to 20252555.750.336.319.9+5.418.1%14.8–18.8%
20264456.849.543.628.5+7.315.1%14.5–18.1%

The most extreme rewrite was on sqltk, where Claude Opus 5.5 had subagents rebuild the original tests from memory and reproduced 80% of the hidden test lines, though those tests were never in its environment. It scored 100, against 50 for GPT-6.1 Sol.

Yet within a task, the features for which Claude Opus 5.5 writes more of the original code are accepted no more often than the others.

06 / Five runs

The mean score holds steady
while features flip.

36.9%Features accepted in some runs and rejected in others.

We ran GPT-6.1 Sol five times on all 150 tasks. The mean feature score stays between 47.0 and 49.1, yet 36.9% of features are accepted in some runs and rejected in others. A per-feature score gives a fine-grained signal that tells those runs apart. A single verdict on the task cannot, because almost no run gets every feature accepted.

GPT-6.1 Sol on pdm, five runs

All five: 17Some: 18None: 21ScoreRun 144.6Run 251.8Run 344.6Run 446.4Run 553.6

All 150 tasks, share of features

All runs 27.9%Some runs 36.9%No run 35.2%
Fig. 4. Each column is one feature of pdm, filled in the runs where it is accepted. The highlighted features change from run to run.

A pass rate
cannot show this.

NL2Repo-Pro shows how much of a library works, where it stops, and how much of it matches the original. The paper, on arXiv soon, gives the full results and analysis, and the tasks are on Hugging Face.