Quilt
Quilt enables multiple AI coding agents to safely collaborate in a shared Git repository by tracking authorship at the line level and preventing silent overwrites.
Session Management (
start_session): Register an actor (human, agent, or bot) to establish a stable, named identity in the shared checkout.Status & Visibility (
get_status): See who owns which working-tree changes, active claims, and any caught collisions — useful to call before editing or committing.Change Inspection (
get_my_changes): Summarize only the changes attributed to your actor.Conflict Detection (
get_conflicts): Surface overlapping changes and collisions caught between actors.Commit Preview (
preview_mine): See the exact patch that would be committed, optionally scoped to specific files.Attributed Commit (
commit_mine): Commit only your owned hunks as a normal Git commit, leaving other actors' changes untouched in the working tree.Symbol/File Claims (
claim): Reserve files, directories, or individual symbols (e.g.utils.js#formatPrice) before editing to prevent collisions. Supports blocking wait or async queue-based auto-grant.Release Claims (
release): Free claims on specific paths or release all of them at once, unblocking other actors.Human Escalation (
escalate): Flag an irreconcilable collision (e.g., two opposed intents on the same line) for human resolution.Conflict Resolution (
resolve): Mark a flagged collision as resolved, closing its flag and recording an audit trail.Attributed File Edit (
quilt_edit): Replace a unique string in a file with authorship recorded at edit time — no separate claim step needed.Attributed File Write (
quilt_write): Create or overwrite a whole file, recording the actor as the author of all contents at write time.
Provides line-level attribution and per-agent commits for Git repositories, enabling multiple AI agents to work in a shared checkout without collision, with symbol-level claims and collision prevention.
Quilt
Quilt is a command-line tool that tracks which agent wrote which lines in a shared Git checkout, so multiple AI coding agents can work in one repo at once and each commits only its own changes.
It captures every edit at the tool boundary, keeps a per-line record of who wrote
what, and reconstructs each agent's own changes at commit time. Git stays the
source of truth. Quilt never calls an LLM or spawns agents, and its state lives in
a .quilt/ sidecar you can delete without touching your repo.

npm install -g @quilt-dev/cli
quilt setup # capture hooks wired; claim enforcement via Claude hooks or MCPThe problem
You want your agents in ONE checkout: one node_modules, one build, one dev
server, one environment to keep working, not a worktree per agent, each with
its own install and its own drift. But on a shared checkout, plain git bites
even when agents work on completely different things: the first git commit -am
sweeps everyone else's uncommitted files into one blob, codegen and lockfile
churn get credited to whoever committed last, and two agents occasionally do
land on the same line, where one silently overwrites the other. None of that
requires agents to be working on the same task. It's just what a shared
checkout does by default.
Quilt makes the shared checkout safe. Every agent commits exactly its own lines and nothing else: disjoint work stays disjoint all the way into history, with no ceremony. And when two agents genuinely want the same code, that becomes a coordinated handoff instead of a silent loss. It holds as you add agents.
./examples/fleet.sh runs seven agents against one checkout. The two endings:
WITHOUT quilt 1 commit for 7 agents — six got "nothing to commit", their
work swept into the first agent's blob. a7 silently
overwrote a1's change to getUser. a1's work is gone.
WITH quilt 6 clean commits, one per agent, each exactly its own lines.
a7's write into a1's claimed function was denied before any
bytes changed, with a1's stated intent in the denial.Related MCP server: cafecito
When two agents want the same file
Fanning out on disjoint files is the easy case. The real test is contention. A denied claim isn't a dead end. It carries the holder's stated intent and when their lease lapses:
$ QUILT_ACTOR=builder-flows quilt claim deals.js flows.js --intent "wire flows to deals"
✗ denied deals.js (held by builder-friction)
builder-friction is: friction pass: rename + archive flags
their claim lapses 2026-07-04T22:12:05Z unless renewed
✓ claimed flows.jsSo the blocked agent builds its granted files while it waits, re-claims after
the holder's commit auto-releases, and layers its change on top of the landed
one. Two clean commits, both changes in the file, nothing lost.
./examples/contention.sh runs the whole sequence on the real machinery.
What it does
One shared checkout. Model humans, agents, and bots as actors editing one working tree, no worktree per agent.
Line-level attribution.
commit --minecommits only your lines, even when they share a hunk with another actor's.Symbol-level claims. Reserve
utils.js#formatPrice, not the whole file, so agents editing different functions never contend. Ten languages via tree-sitter; whole-file claims for the rest.Collision prevention. A write into code another agent has claimed is denied, with the holder's stated intent, before any bytes change.
Push-awareness. Claim a symbol that depends on a function another actor is changing, and Quilt warns you at claim time.
Detect and preserve. If one actor overwrites another's uncommitted lines, Quilt snapshots the victim's version so nothing is silently lost.
Every commit Quilt produces is an ordinary Git commit. It trusts Git and never
rewrites it, and all state lives locally under .quilt/. No account, no daemon.
Quickstart
quilt setup # wire Quilt into the repo (capture hooks + optional MCP tools)
quilt doctor # confirm it's wired and capture is flowingThat's it. Agents are named automatically: each Claude Code session or MCP connection gets its own id, so parallel agents are told apart with no setup.
4 terminals, one repo
The whole flow, from a git repo to four agents working at once:
cd your-repo
quilt setup # once, ~5 seconds
claude # terminal 1
claude # terminal 2
claude # terminal 3
claude # terminal 4Start sessions from a directory that holds several repos? Run quilt setup
there instead: it wires the workspace root and every repo inside, and each
edit is captured into the repo its file belongs to.
Nothing else. No QUILT_ACTOR, no per-terminal ceremony, nothing to approve:
the capture hooks attribute every edit to its session automatically. Watch it
live with quilt fleet, and when a session's work is ready, ask it to run
quilt commit --mine -m "...". Each commit contains exactly that session's
lines, even where two sessions touched the same file. (Claude Code will also
offer to enable the optional quilt MCP server for the project; approving it
adds the claim/prevention tools, but the hooks protect you either way.)
Watch the fleet
quilt ui opens the same picture in your browser, live: who wrote what
(per-actor line counts per file), active claims, who's blocked on whom, and
anything that needs a human. Local-only (127.0.0.1), read-only, one command.

Prefer the terminal? quilt fleet --watch is the same view as text.
Set an explicit id when you want one that is stable across sessions:
QUILT_ACTOR=auth-agent claude # this agent's edits are attributed to auth-agentThen each agent commits only its own lines:
quilt status # who owns what
quilt preview --mine # exact patch that would be committed
quilt commit --mine -m "fix auth redirect"
quilt provenance HEAD # actor, session, files, hunks, treeQuilt writes that provenance into the Git commit itself, so it survives normal
pushes and fresh clones. Prompt correlation stays local in quilt ui; it is not
published into Git history.
In a shared shell, make the committer explicit (quilt --as auth-agent commit --mine ...). Quilt refuses a checkout-global session identity when the dirty
tree shows another actor. If a deploy provider requires a recognized Git email,
set one once while keeping actor names distinct:
quilt config author.email you@example.comquilt fleet shows the whole picture: every actor, their claims, and anything
that needs a human. See docs/reference.md for the full
command list.
Why not worktrees?
A worktree per agent is the usual answer, and for fully independent tasks it works. But every worktree is another environment to build (another install, another build cache, another dev server) and isolation just moves the collision to merge time. Those costs grow with the number of agents; the whole point of a shared checkout is paying for the environment once.
Run fewer agents | Worktree per agent | Quilt | |
Parallelism | capped low | high | high |
Setup per agent | none | full install/build/env × N | none (one checkout) |
See each other's in-flight work | n/a | no | yes |
Collisions | avoided by hand | surface at merge | prevented, or surfaced live |
Clean per-agent commits | n/a | after a merge | yes |
Worktrees isolate; they don't coordinate. When agents work the same code at the same time, you usually want them to see each other and account for each other as they go. That is what Quilt does. The two aren't mutually exclusive: worktrees for independent, long-running work, Quilt for agents in the same code at once.
Using it with agents
quilt setup wires the capture hooks and a shared MCP server. On Claude Code the
hooks let agents use the built-in Edit and Write tools normally while Quilt
records each change's author and blocks a write into code another agent holds,
with no protocol for the agent to follow and no setup: each session is named
automatically, or carries its own QUILT_ACTOR for a stable id. For other
runtimes, the same capture and prevention is available as MCP tools, with each
connection named automatically the same way.
See docs/orchestrators.md for Codex, Cursor, Aider, and the difference between process-per-agent and many-agents-in-one-process setups.
Docs
docs/orchestrators.md: running a fleet of agents.
docs/reference.md: the full command list, how attribution works, and the
.quilt/state layout.bench/: the scenario ladder Quilt is tested against, run with and without Quilt on the same metrics.
Telemetry
One anonymous heartbeat per day: quilt version, OS, Node major, random
local id. Nothing else unless you opt in at quilt setup, and never code,
paths, repo or actor names. quilt telemetry off, QUILT_TELEMETRY=0, or
DO_NOT_TRACK=1 silences everything. Details: docs/reference.md.
Contributing
Contributions are welcome. See CONTRIBUTING.md.
License
MIT
Available Tools
12 toolsclaimA
Reserve files BEFORE you edit them — a claim placed before editing is also what BINDS your external edits to your actor id, so claim whole files first as the default. Use a bare path for a whole file, a trailing slash for a whole directory (e.g. convex/_generated/ — right for codegen output), or path#symbol (e.g. utils.js#formatPrice) to reserve one function so others can edit other parts of the same file in parallel (a symbol that does not exist in the file is denied with a suggestion, since it would bind nothing). Pass a short intent (the why) so an actor you block can resolve the collision from it. A denied target is held by another actor — its holderIntent tells you what they're doing, so reconcile from that instead of just waiting.
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | seconds to BLOCK waiting for holder-denied targets to free up (holder releases, commits, or their lease lapses) instead of polling yourself. Returns as soon as everything grants. Capped at 120 per call — re-call to keep waiting. Denials that waiting can't fix (bad path, missing symbol) return immediately. | |
| actor | No | actor id to act as. Auto-derived per connection when omitted (from the client name, e.g. cursor-3fa2), so naming is optional for a single agent. Pass an explicit id (your role/task name) when several subagents share one server — they have no ambient identity to tell them apart — or when you want a stable id across runs. | |
| paths | Yes | ||
| queue | No | ASYNC alternative to wait: if denied by a holder, register interest and return immediately — you are AUTO-GRANTED the target when it frees. Do NOT block. Keep working; the grant appears in get_status as `grantedWhileWaiting`. Best when you have other work to do meanwhile. | |
| intent | No | a short why for this claim, e.g. the ticket/task | |
| creating | No | allow symbol claims for symbols you are ABOUT TO ADD to an existing file (they bind at write time). Without it, a symbol missing from the file is denied. |
commit_mineA
Commit ONLY your owned hunks as an ordinary git commit, leaving every other actor's changes untouched in the working tree. This is how each agent lands its own work in a shared checkout without sweeping up anyone else's. The committed files' claims auto-release, so no separate release call is needed. Preview it first with preview_mine.
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | actor id to act as. Auto-derived per connection when omitted (from the client name, e.g. cursor-3fa2), so naming is optional for a single agent. Pass an explicit id (your role/task name) when several subagents share one server — they have no ambient identity to tell them apart — or when you want a stable id across runs. | |
| paths | No | limit the commit to these files (default: all your owned files) — a hard filter, so an unnamed orphan/leftover is never swept in | |
| message | Yes | the commit message | |
| includeUnclaimed | No | also commit new/untracked files you authored but never claimed (default: false, so an unclaimed orphan is never swept into your commit while another actor is active) |
escalateA
Flag a collision you CANNOT reconcile (e.g. two opposed intents on the same line) for a human. Use this instead of forcing a change through when a denied claim's holderIntent conflicts with yours. It shows up under 'Needs you' until resolved.
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | actor id to act as. Auto-derived per connection when omitted (from the client name, e.g. cursor-3fa2), so naming is optional for a single agent. Pass an explicit id (your role/task name) when several subagents share one server — they have no ambient identity to tell them apart — or when you want a stable id across runs. | |
| reason | No | why it needs a human — name the opposed intents | |
| target | Yes | the clash, e.g. pool.js#maxConnections |
get_conflictsA
Show overlapping/shared changes and collisions that were caught.
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | actor id to act as. Auto-derived per connection when omitted (from the client name, e.g. cursor-3fa2), so naming is optional for a single agent. Pass an explicit id (your role/task name) when several subagents share one server — they have no ambient identity to tell them apart — or when you want a stable id across runs. |
get_my_changesA
List the changes YOU own in the working tree: the files and hunks attributed to your actor id, with per-file added/removed line counts. The 'what have I done so far' view, scoped to just you. Review your own work with it before committing — use get_status for who-owns-what across all actors, or preview_mine for the exact patch commit_mine would produce.
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | actor id to act as. Auto-derived per connection when omitted (from the client name, e.g. cursor-3fa2), so naming is optional for a single agent. Pass an explicit id (your role/task name) when several subagents share one server — they have no ambient identity to tell them apart — or when you want a stable id across runs. |
get_statusA
Show who owns which working-tree changes, plus caught collisions and active claims. Call before editing and before committing.
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | actor id to act as. Auto-derived per connection when omitted (from the client name, e.g. cursor-3fa2), so naming is optional for a single agent. Pass an explicit id (your role/task name) when several subagents share one server — they have no ambient identity to tell them apart — or when you want a stable id across runs. |
preview_mineA
Show the exact patch commit_mine would create right now: only your owned hunks as a unified diff, plus the files, whole-file additions, and added/removed line totals. A dry run, nothing is written. Review it before commit_mine to confirm you are committing your lines and nothing else.
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | actor id to act as. Auto-derived per connection when omitted (from the client name, e.g. cursor-3fa2), so naming is optional for a single agent. Pass an explicit id (your role/task name) when several subagents share one server — they have no ambient identity to tell them apart — or when you want a stable id across runs. | |
| paths | No | limit to these files (default: all your owned files) | |
| includeUnclaimed | No | also include new/untracked files you authored but never claimed (default: false, so an unclaimed orphan is left out while another actor is active) |
quilt_editA
Edit a file through Quilt instead of your raw editor. Replaces the unique old_string with new_string and records WHO authored the change at the moment of the edit — so attribution is exact even when several agents share this checkout, with no claims or reconcile guesswork. Pass why (your ticket/task). Prefer this over a plain file edit when coordinating a fleet.
| Name | Required | Description | Default |
|---|---|---|---|
| why | No | a short why for this edit, e.g. the ticket/task | |
| path | Yes | file path (repo-relative or absolute; stored repo-relative) | |
| actor | No | actor id to act as. Auto-derived per connection when omitted (from the client name, e.g. cursor-3fa2), so naming is optional for a single agent. Pass an explicit id (your role/task name) when several subagents share one server — they have no ambient identity to tell them apart — or when you want a stable id across runs. | |
| new_string | Yes | the replacement text | |
| old_string | Yes | the exact text to replace (must be unique in the file) |
quilt_writeA
Create or overwrite a whole file through Quilt instead of your raw editor, recording YOU as the author of its contents at write time, so attribution is exact even when several agents share this checkout, with no claims or reconcile guesswork. Use this for new files; use quilt_edit to change part of an existing one. Pass why (your ticket/task). If another agent holds this path, the write is denied with their intent so you can reconcile instead of clobbering.
| Name | Required | Description | Default |
|---|---|---|---|
| why | No | a short why for this write, e.g. the ticket/task | |
| path | Yes | file path (repo-relative or absolute; stored repo-relative) | |
| actor | No | actor id to act as. Auto-derived per connection when omitted (from the client name, e.g. cursor-3fa2), so naming is optional for a single agent. Pass an explicit id (your role/task name) when several subagents share one server — they have no ambient identity to tell them apart — or when you want a stable id across runs. | |
| content | Yes | full file contents to write |
releaseA
Release your claims on the given paths. Omit paths to release ALL of yours; an empty array releases none.
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | actor id to act as. Auto-derived per connection when omitted (from the client name, e.g. cursor-3fa2), so naming is optional for a single agent. Pass an explicit id (your role/task name) when several subagents share one server — they have no ambient identity to tell them apart — or when you want a stable id across runs. | |
| paths | No |
resolveA
Mark a collision as sewn/handled after you reconciled it — closes its 'Needs you' flag and records the audit trail. Use after you've merged or adapted so the work accounts for both intents.
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | what you did to reconcile it | |
| actor | No | actor id to act as. Auto-derived per connection when omitted (from the client name, e.g. cursor-3fa2), so naming is optional for a single agent. Pass an explicit id (your role/task name) when several subagents share one server — they have no ambient identity to tell them apart — or when you want a stable id across runs. | |
| target | Yes | the clash that was resolved, e.g. pool.js#maxConnections | |
| takeFrom | No | also transfer dirty operations from this stale/conflicting actor to the resolver |
start_sessionA
Register an actor and start a session in this repo, pinning this server to that identity. Optional: if several agents share one server, skip this and pass actor on each call instead.
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| type | No | ||
| actor | Yes | actor id, e.g. auth-agent | |
| No |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
- Changed
resolve1 field changed- added
Input schema / properties / takeFromAdded value: +{ + "description": "also transfer dirty operations from this stale/conflicting actor to the resolver", + "type": "string" +}
3 tool updates
v0.4.4- Changed
commit_mine2 fields changed- added
Input schema / properties / includeUnclaimed / descriptionAdded value: +"also commit new/untracked files you authored but never claimed (default: false, so an unclaimed orphan is never swept into your commit while another actor is active)" - added
Input schema / properties / message / descriptionAdded value: +"the commit message"
- Changed
preview_mine1 field changed- added
Input schema / properties / includeUnclaimed / descriptionAdded value: +"also include new/untracked files you authored but never claimed (default: false, so an unclaimed orphan is left out while another actor is active)"
- Changed
quilt_write2 fields changed- changed
Input schema / properties / content / descriptionPrevious value: -"full file contents"New value: +"full file contents to write" - added
Input schema / properties / why / descriptionAdded value: +"a short why for this write, e.g. the ticket/task"
12 tool updates
v0.4.3- First observed
claim - First observed
commit_mine - First observed
escalate - First observed
get_conflicts - First observed
get_my_changes - First observed
get_status - First observed
preview_mine - First observed
quilt_edit - First observed
quilt_write - First observed
release - First observed
resolve - First observed
start_session
TDQS
Scored across 12 tools
Most tools have distinct roles: start_session, claim/release, preview_mine/commit_mine, and quilt_edit/quilt_write are clear. However, get_status, get_my_changes, and get_conflicts overlap somewhat since get_status already covers ownership and collisions, which could cause misselection between the overview and specialized views.
The names are consistently snake_case and mostly verb-first, with clear pairs like claim/release and escalate/resolve. Minor deviations exist: bare imperative verbs sit alongside get_* noun-object names, and quilt_edit/quilt_write use a different prefix pattern, but the naming remains predictable overall.
Twelve tools is well-scoped for the multi-agent collaboration domain. Each tool maps to a distinct workflow step—session setup, inspection, claiming, editing, committing, and conflict resolution—without obvious bloat.
The set covers the full lifecycle: start a session, inspect ownership, claim files, edit/write, preview, commit, resolve conflicts, and escalate. Minor gaps like no explicit revert/abandon-changes tool exist, but agents can work around them with release and raw git operations.
Maintenance
Related MCP Connectors
Coding agents from Claude Code, Cursor and Codex claim jobs and lock files on one shared board.
Source control for coding agents: declare an intent, settle overlaps before code, verify each push.
1Git-backed platform for skills, tools, and context for AI agents
Parallel coding agents claim a file before editing, so none overwrites another.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables multiple AI agents to collaborate on the same git repository by coordinating work via a shared claims branch, detecting file conflicts before they happen.933 PyPIPolyForm Noncommercial 1.0.0

cafecitoofficial
AlicenseNot gradedqualityCmaintenanceEnables AI agents to coordinate on a shared repository using commutativity-proven parallel landing and regenerative merge, avoiding rebase conflicts through symbol-level leases.Apache 2.0- AlicenseNot gradedqualityCmaintenanceMultiplayer coordination for AI coding agents: Claude Code, Codex CLI and Cursor share one room per repository. An agent claims a path glob before it edits and a conflicting claim is refused at claim time, so collisions are prevented rather than resolved at merge. Metadata only — source code and diffs never leave the machine.MIT
- AlicenseNot gradedqualityCmaintenanceEnables multiple AI coding agents to collaborate on the same Git repository without conflicts through isolated worktrees, file locking, automated test verification, and a serialized merge queue.3 npm8MIT