drksci

quilt

quilt lets several agents work on one repository at once, each in a thin view of its own. On seven WordPress changes, run by script, it added 1 MB where a git worktree each added 341 to 583 MB.

Status
Alpha
Stack
Rust, Git
By
d/rksci labs
Index
  1. Four agents, one checkout
  2. What it is for
  3. How it works
  4. What the scripted runs measured
  5. What real agents did
  6. What is not known

Four agents, one checkout

quilt gives each agent its own branch and a thin view of the one repository, so agents can work at the same time without overwriting each other. It is an alpha. The WordPress figures come from scripted runs with no model. Real agents have been run on smaller tasks, once each, and quilt was not always the faster tool.

What it is for

Agents that share one checkout overwrite each other. A git worktree each fixes that, at a price: every worktree is a full copy with its own install, the copies drift from the main branch, and a conflict shows up at merge time, when the reason for it has gone.

quilt aims to remove those costs on an existing repository in any language, and to leave no trace. It adds no file, hook or service to the repository. Its state lives in .git, and its branches and merges are ordinary Git.

A thin layer each, or a full copy each

quiltgit worktree1 MB for 4 agents264 MB for 4 agentsdotted: installed dependencies, 66 MB
Figure 1Redrawn from the quilt repository. The figures are its small Python demo, not WordPress: four views add 1 MB, four worktrees 264 MB.

How it works

A request is cut up by a person or an agent. quilt takes the result and runs it in four moves.

A view each

Each agent works on an ordinary Git branch, in a view: a layer over the one repository that holds only what that agent changed, with installed dependencies already in place. On Linux the view is an overlay. Elsewhere it is a clone on APFS, Btrfs or XFS, or a plain copy.

Patches

The part of a change that more than one agent depends on goes in first, with its final signature and a stand-in body. This is a patch. Other agents call it from the start, and their code builds before the real body exists.

Merge as work finishes

A branch that only fills a body merges at once. A branch that changes a signature runs the check first, and the branches that call it are told to update. The main line never carries an open patch.

Private ports

Each command in a view runs in a network namespace of its own, so 127.0.0.1 belongs to that command. Where a namespace cannot be made, the command runs with the machine's ports and quilt says so once.

A patch is marked in the source by a quilt:patch comment that names the branch that will fill it. The marker is tracked, so a patch is still found after its function is renamed or moved, and a branch cannot merge with its own patch open.

function wp_remove_surrounding_empty_script_tags( $contents ) {
	// quilt:patch script.strip
	return $contents; // stand-in
}

One file as four patches, one agent to each

demo_helpers.pydef slugify(text):# quilt:patch slugify for fill-slugifyagent 1def initials(name):# quilt:patch initials for fill-initialsagent 2def clamp(value, low, high):# quilt:patch clamp for fill-clampagent 3def chunks(items, size):# quilt:patch chunks for fill-chunksagent 4
Figure 2Redrawn from the quilt repository's Python demo. Each box is a signature and a marker naming the branch that fills it.

Two test suites that start a server on one fixed port cannot run at once on one machine, and a worktree each does not change that. The clash cost quilt its slowest run, reported below.

Two test runs, one port

a worktree eachquiltagent 1agent 2127.0.0.1:8000one port: the second run waits or failsagent 1agent 2127.0.0.1:8000127.0.0.1:8000a localhost for each command
Figure 3Private ports were tested on Linux only; on macOS the command falls back to the shared port.

Four commands cover the loop

CommandDoes
git quilt run BRANCH -- COMMANDRuns a command or an agent in a branch's view
git quilt statusShows what each branch changes, and where the branches overlap
git quilt merge BRANCHMerges a branch, checking first if a signature changed
git quilt plan FILERuns a plan: outline, parallel fills, merges
From the README. The full list is on the project's usage page.

What the scripted runs measured

Seven changes from the history of WordPress (6,989 files), three of them security fixes. Each was loaded at its parent commit and split into four parts by file. A script applied each part, so no model was involved and the figures are the tools' own cost. One run each, on 28 November 2026, on one Linux machine with 4 cores.

Disk added by four agents, change by change

git worktreequiltScript-tag helper414 MB1 MBSecrets API583 MB1 MBPassword hashing490 MB1 MBtheme.json check341 MB1 MBAbility capabilities543 MB1 MBUnicode email524 MB1 MBTemplate revisions414 MB1 MB
Figure 4Each pink mark is the size of the four views' own files, rounded up to 1 MB. One scripted run per change.

Both tools passed every withheld test

ChangeTests passedDisk, worktreesDisk, quiltTime, worktreesTime, quilt
Script-tag helper207 of 207414 MB1 MB4.0 s2.8 s
Secrets API63 of 63583 MB1 MB5.4 s5.4 s
Password hashing195 of 195490 MB1 MB5.9 s2.7 s
theme.json check20 of 20341 MB1 MB6.6 s2.2 s
Ability capabilities180 of 180543 MB1 MB6.3 s3.0 s
Unicode email300 of 300524 MB1 MB5.5 s3.1 s
Template revisions22 of 22414 MB1 MB5.2 s2.6 s
Scripted, one run each. Time is set-up and merge, with no agent thinking in it.

quilt was faster in six of seven and tied on the Secrets API. Setting up each worktree took 1.8 to 4.4 s, and a view needs no set-up. A scripted run measures set-up and merge, so the time columns say little about a real session.

The 1 MB is the size of the views' own files. Read from the filesystem's used space, an overlay view costs about 6 MB, and what the difference is has not been traced.

What real agents did

Real agents have been run three times, each on something smaller than the WordPress set, each once. All used Claude Code with Sonnet 5.5, four agents to a task.

Four small Flask tasks, both ways

TaskWorktreesquilt
Disjoint files9 s, $0.23, 0 refused, main line passes11 s, $0.25, 0 refused, main line passes
Four patches in one file55 s, $0.53, 3 refused, main line passes24 s, $0.37, 0 refused, main line passes
Two agents rewrite one function72 s, $0.60, 3 refused, main line passes39 s, $0.40, 1 refused, main line passes
A signature changes under a caller14 s, $0.29, 0 refused, main line fails34 s, $0.36, 0 refused, main line passes
One run each, quilt 0.1.0. Refused counts merges that conflicted or were refused and went back to an agent.

The four tasks cost $1.65 with a worktree per agent and $1.39 with quilt. In the last one, the two worktree branches merged cleanly and left the main line failing. quilt merged the signature change first and sent the agent whose test used the old signature back with a note, which took 20 s longer and left the main line passing.

On a larger task, a proxy change to httpx, quilt was slower: 229.1 s against 72.2 s, with 3 MB of disk against 94 MB and $0.83 against $0.64. Both arms passed 76 of 79 withheld tests. Two quilt agents each lost 120 s to a test command that did not return, because two copies of httpx's suite were started at once and the suite binds one fixed port. quilt's own merges and checks took 8 s of the 229. The same clash can hit a worktree per agent, and in that run it did not, because the agents ran their tests at different moments.

One WordPress change, the script-tag helper, was run once with four real agents. The project does not count it: the request did not name the function the withheld tests call, so both tools ended with the same 7 of 207 tests in error. What it did measure was 512 MB against 2 MB, 92.5 s against 93.8 s, and $0.62 against $0.81.

What is not known

The loop (work on a branch in a view, save, merge, plan) runs and is tested on Linux. The released binaries were run on Linux and macOS, x86-64 and ARM, by a smoke workflow that passed on all four: the npx line, the install script, and a branch worked on and merged in a view. No person has used quilt on a Mac, nothing has been measured on one, and the overlay view is Linux only.

Private ports have the least coverage. They were tested on Linux, as root and as an ordinary user, on one version of passt. They were not run on macOS, where the command falls back to shared ports, and not under the AppArmor profile Ubuntu ships for passt. The probe that decides whether to use them fails closed, so the expected result there is a fallback, and that is untested.

The patch markers are untested against a formatter that breaks a marker across lines, and against Git older than 2.38. No harness other than Claude Code and no model other than Sonnet has been run.

quilt is a d/rksci labs alpha, at 0.1.2. Every number here is from the README and status page of drksci/quilt at commit 3688ba4, where each run has its method and its data. The four plates are redrawn here from that project's figures.

Revisions

  1. WorkprintFirst write-up, from the quilt README, status and design pages.
  2. WorkprintReworked against the quilt repository at 3688ba4. Corrected: real agents have been run, on Flask and httpx, and private ports are untested under AppArmor. Added four plates redrawn from the project's figures, the real-agent runs and their limits, and the conditions of each number. Dropped the row of headline numbers under the lead; each is in the text where it is used.
  • Autonomous Agents
  • Git
  • Developer Tools
  • Evaluation