Concord is an orchestration engine and MCP server for running multiple AI coding agents (OpenCode, Claude Code, Cursor, ...) at the same time on the same repository without them silently breaking each other's work.
[!NOTE]
Jump straight to the Benchmark Results & Tests below: 652/652 in all 5 runs on 12-agent Python CommonMark (3.1× faster than one agent, 1.6× faster than an AI integrator, 0 conflicts) and 48/48 (100.0%) on 6-agent TypeScript dispecerat (2.20× speedup, 0 conflicts, zero per-ticket test hints).
Highlights
The problem
Today's parallel-agent setups give each agent its own git worktree. That stops agents from overwriting each other's files, but not from breaking each other's code:
# notify/email.py (agent A: rate-limit e-mails) # auth/reset.py (agent B: password reset)
-def send_email(to, body): +def request_reset(user):
+def send_email(to, body, *, user_id): + token = tokens.issue(user)
... + send_email(user.email, reset_msg(token))
The two agents touch different files, so git merges cleanly, file locks see no conflict, and both branches pass their own tests. The merged program crashes with TypeError: send_email() missing 1 required keyword-only argument: 'user_id'. Meanwhile, a third agent that only rewrites the body of another function in notify/email.py would be blocked by a file lock for no reason.
The idea
Files are the wrong unit of coordination. Agents break each other through contracts: the signatures, types, exported names, routes, and schemas that other code depends on. Concord treats every agent's worktree like a CPU cache and every symbol like a cache line, and runs a coherence protocol over them:
-
Infer, don't ask. It watches what each agent actually reads and edits (hooks, diffs) and maps it onto a symbol graph, giving a footprint per agent: symbols read, written, and used by the agent's new code.
-
Contract vs. body, breaking vs. compatible. Every symbol is split into its contract and its body. Body edits never block anyone. Contract changes are classified from structured signatures:
- breaking, e.g. a new required parameter;
- compatible, e.g. a new optional parameter, which only produces an informational notice.
Only concurrent edits to the same contract are serialised, through a short lease.
-
Precise notices + finish gate. When a contract changes, Concord sends a short, generated notice only to the agents whose footprint depends on it. The notice has the old and new contract and the recipient's exact call sites. An agent cannot finish while it depends on a stale contract.
-
Speculative integration. In the background, all branches are merged in memory, type-checked, and the affected tests are run, to catch whatever the contract model misses.
Benchmark results
1. Python — 12 Agents Building a Full CommonMark 0.31.2 Parser (concord-bench)
Twelve parallel OpenCode agents (opencode-go/hy4-flash-free) implement all sections of the CommonMark 0.31.2 Markdown→HTML specification from a minimal paragraph-only scaffold, judged by the official 652-example CommonMark specification suite. Main study (pre-registered in PROTOCOL.md): opencode-go/hy4-flash-free, runs interleaved by round, mean ± SD over n valid runs. Full report with bootstrap CIs, tests and figures: concord-bench/results/hy4m.
| Condition |
n |
Spec examples passed (of 652) |
Integration loss |
Merge conflicts (of 12 branches) |
Wall-clock time |
sequential (1 agent, ticket by ticket) |
5 |
651.2 ± 0.8 (650–652) |
0 |
0 |
65.1 ± 5.9 min (1.0×) |
parallel-off (12 agents, uncoordinated) |
5 |
199.0 ± 30.1 (161–236) |
301.8 ± 45.8 |
9.0 ± 1.4 |
13.7 ± 1.9 min |
parallel-integrator (12 agents + 13th integrator agent) |
5 |
652 in every run |
0 |
9.4 ± 1.1, resolved by the integrator |
34.2 ± 4.8 min (1.9×) |
Concord, peer merge (parallel-concord: --mode enforce --peer-merge) |
3 |
652 in every run |
0 |
0 |
27.1 ± 3.5 min (2.4×) |
Concord, region coherence (parallel-regions: --mode enforce --regions) |
5 |
652 in every run |
0 |
0 |
20.8 ± 1.9 min (3.1×) |
Pre-registered tests (Mann–Whitney U, Holm-corrected, Cliff's δ), region coherence vs: parallel-off on examples passed (H1) and integration loss (H2), and sequential on wall time (H3): δ = ±1.00, p = 0.03 each. Exploratory: region coherence is faster than the integrator in every pairing (δ = −1.00, p = 0.008, uncorrected). A replication with opencode-go/deepseek-v4.1-flash (n = 3 per condition) is running.
2. TypeScript 5 (strict) — 6 Agents Building dispecerat with Zero Per-Ticket Test Hints (concord-bench)
Exploratory, n = 1 per condition (rescored after a fix to the evaluator's fixtures, see PROTOCOL.md). Six parallel OpenCode agents (opencode-go/hy4-flash-free) implement coupled features sharing lib/types.ts, DemoBackend, and @/lib/... tsconfig aliases with no pre-written feature tests and no per-ticket check commands (only --test-cmd ./scripts/run-tests.sh), judged by a held-out 48-test suite (42 per-ticket + 6 cross-ticket runtime synergy tests):
| Condition |
Held-out spec (of 48) |
Cross-ticket synergy |
Integration loss |
Merge conflicts |
Wall-clock time |
sequential (1 agent, ticket-by-ticket) |
48 / 48 (100.0%) |
6 / 6 |
0 |
0 / 6 |
13.3 min (1.0×) |
parallel-off (6 agents, uncoordinated) |
21 / 48 (43.8%) |
0 / 6 |
21 |
3 / 6 |
6.0 min |
parallel-fileleases (6 agents, file locks) |
14 / 48 (29.2%) |
0 / 6 |
25 |
4 / 6 |
7.7 min |
parallel-integrator (6 agents + 7th integrator) |
48 / 48 (100.0%) |
6 / 6 |
0 |
0 / 6 (7th agent) |
11.7 min (1.13×) |
Concord (--mode enforce --regions) |
48 / 48 (100.0%) |
6 / 6 |
0 |
0 / 6 |
6.0 min (2.20×) |
Install and use it from your agent (MCP)
Concord runs locally, next to your repository, as an MCP server. Your coding agent (OpenCode, Claude Code, Cursor, or any MCP client) gets 12 tools to plan, coordinate, verify, and merge parallel work automatically.
1. Install & auto-connect (macOS, Linux):
# Homebrew (macOS & Linux):
brew install lucas-rus/tap/concordmcp && concord setup
# Or curl installer:
curl -fsSL https://raw.githubusercontent.com/lucas-rus/concord/main/install.sh | sh -s -- --setup
(From source with Rust ≥ 1.90: cargo install --git https://github.com/lucas-rus/concord concord-cli && concord setup.)
2. Or connect manually:
OpenCode (one-line CLI, no JSON editing):
opencode mcp add --global concord -- concord mcp --agent-cli opencode
Antigravity (writes ~/.gemini/config/mcp_config.json; restart Antigravity afterwards):
concord setup --client antigravity
or add it by hand to ~/.gemini/config/mcp_config.json:
{ "mcpServers": { "concord": { "command": "concord", "args": ["mcp", "--agent-cli", "opencode"] } } }
All planning, inspection, and merge tools run directly inside Antigravity. concord_run launches its parallel workers with OpenCode or Claude Code (--agent-cli opencode|claude), so one of them must be installed to use team runs.
Claude Code (plugin with the MCP server and a concord-team skill):
/plugin marketplace add lucas-rus/concord
/plugin install concord@lucas-rus-concord
MCP Tools (12):
- Planning, contract inspection & smart merging (for any agent workflow):
concord_plan — partition the repository symbol graph into shared contract hubs and producer-first parallel ticket clusters
concord_symbols — list symbol signatures and line spans without function bodies (~10× fewer tokens than reading whole files; Python, TS/JS, Rust, Go, C/C++, SQL, Prisma, Protobuf, OpenAPI)
concord_diff_contracts — contract-level diff between revisions or working tree, with impacted callers
concord_worktrees — zero-mutation live check across all active git worktree checkouts (Claude Squad, Cursor worktrees, manual worktrees)
concord_analyze — check concurrent branches for cross-file contract violations, duplicate symbols, and textual overlaps
concord_smart_merge — merge branches producer-first with AST-verified insertion union, post-merge call conformance, optional --type-check, and $O(\log k)$ test failure bisection
concord_negotiate / concord_ack — propose a signature adjustment to a symbol's live owner or acknowledge a peer's contract change
- Parallel team orchestration:
concord_run, concord_status, concord_result (includes SASE Merge-Readiness Pack), concord_cancel
Try it from the command line
Requires Rust ≥ 1.90 and git ≥ 2.38.
git clone https://github.com/lucas-rus/concord && cd concord
cargo build --release
# Build the running example: branches agent-a, agent-b, agent-c from a common base.
examples/running-example/setup.sh /tmp/concord-demo
./target/release/concord analyze --repo /tmp/concord-demo --base main agent-a agent-b agent-c --notices
Findings
BREAKING agent-a -> agent-b: notify.email.send_email (no shared files: invisible to textual merge and file locks)
now: def send_email(to, body, *, user_id)
what: new required parameter `user_id`
auth/reset.py:11 request_reset: send_email(user.email, reset_msg(token))
FILE agent-a & agent-c: notify/email.py disjoint symbols (a file lock would serialise this needlessly)
Textual merge (git merge-tree)
agent-a & agent-b: clean
agent-a & agent-c: clean
agent-b & agent-c: clean
Protocol simulation (notices each agent would receive)
-> to agent-b
[concord] BREAKING contract change: notify.email.send_email v0 -> v1 (by agent-a)
before: def send_email(to, body)
after : def send_email(to, body, *, user_id)
what : new required parameter `user_id`
your code that depends on it:
auth/reset.py:11 request_reset: send_email(user.email, reset_msg(token))
Finish gates:
agent-a: open
agent-b: BLOCKED (1 unresolved)
agent-c: open
Other commands:
concord setup # auto-connect OpenCode, Claude Code, Cursor, and Antigravity MCP
concord plan --rev HEAD # identify shared hubs & producer-first parallel ticket clusters
concord symbols src/ # symbol contracts & spans (Py, TS/JS, Rust, Go, C/C++, SQL/Prisma/Proto/OpenAPI)
concord diff old.py new.py # contract vs. body changes between two versions
concord worktrees --base main # inspect all active git worktrees (incl. uncommitted edits)
concord typecheck --repo . # auto-detect & run Tier-2 checker (tsc, pyright/ty, cargo check, go vet)
concord merge --base main b1 b2 --type-check # contract-ordered smart merge + verified union + conformance + type check
concord mrp .concord/runs/<run-id> # render SASE Merge-Readiness Pack (markdown or --json)
concord analyze --base main b1 b2 --json # machine-readable output (for CI & experiments)
concord run --tasks tasks.json --mode enforce --regions --test-cmd "npm test"
concord run --milestones waves.json --mode enforce --regions --test-cmd "npm test"
[!TIP]
Lean by default (0.2.0). In enforce mode the finish gate verifies each hand-off with the agent's own acceptance check instead of spending an agent turn on it, sends an agent back for a failing check at most once, and lets the repair pass after integration handle the rest. On 12-agent CommonMark this cut tokens by about a quarter at the same 652/652 and zero conflicts. --no-lean restores the previous gate. With OpenCode agents, --trim-outputs also keeps large command and search outputs out of the agents' context (head and tail stay; the full output is saved to a file the agent can search).
[!NOTE]
Zero-config acceptance gating: tasks.json only needs [{"name": "...", "prompt": "..."}] — when per-ticket check commands are omitted, Concord automatically uses --test-cmd for finish-gate verification, cross-agent regression gating, and $O(\log k)$ post-merge failure bisection.
GitHub Cross-PR CI Action
Drop action.yml into any workflow to cross-check concurrently open PRs for silent contract breaks:
- uses: lucas-rus/concord@main
with:
base: main
Watch a team live
concord watch follows a run as it happens: what each agent is doing, who waits for whom, and every coordination step Concord takes.
concord watch runs/ # the most recent run under the --out of `concord run`
concord watch runs/ --once # one snapshot, e.g. for a log
concord 1795518603-enforce-463d82 1/12 finished 03:07 · running
agent state edits notices blocks hand-off combined merges
code-spans finished 4 0 0 0 0 0
emphasis working 8 0 0 0 0 0
images-autolinks working 2 0 0 0 1 0
lists working 5 0 0 0 1 0
...
coordination
02:26 region raw-html-breaks yields src/cmark/inlines.py to code-spans
02:36 combine lists + headings add at the same place in src/cmark/blocks.py
02:59 done code-spans finished
First results (RQ1, CooperBench gold patches)
On all 560 Python feature pairs of CooperBench, Concord's textual merge results agree with CooperBench's own gold conflict report on 560/560 pairs. At symbol level: