Skip to main content Switch to mobile version seamlock 0.3.5 Contract-level coherence and smart merging for parallel AI coding agents
pip install seamlock==0.3.5 Copy PIP instructions
Quick Start · Why Seamlock · Benchmarks · MCP Server · CLI · Architecture · Comparison · Changelog
Seamlock is a local Rust orchestration engine and MCP server for running multiple AI coding agents (Claude Code, OpenAI Codex CLI, OpenCode, Cursor, Windsurf, Gemini CLI, VS Code / Copilot, Antigravity, or any MCP client) in parallel on the same repository without merge conflicts or silent cross-file breakage.
Instead of locking whole files or relying on a slow post-hoc merge agent, Seamlock tracks symbol contracts (signatures, types, exports, schemas, HTTP routes) and live edit regions across git worktrees, sending surgical notices only to affected agents and verifying every merge before it lands.
Install Seamlock and auto-connect it to your coding agents (macOS, Linux, and Windows):
# Homebrew (macOS & Linux) brew install lucas-rus/tap/seamlock && seamlock setup # npm / npx (macOS, Linux, Windows) npm install -g seamlock && seamlock setup # PyPI (uvx / pipx — macOS, Linux, Windows) pipx install seamlock && seamlock setup # crates.io (prebuilt via cargo-binstall, or cargo install seamlock-cli) cargo binstall seamlock-cli && seamlock setup # Shell installer (macOS / Linux) or PowerShell (Windows) curl -fsSL https://raw.githubusercontent.com/lucas-rus/seamlock/main/install.sh | sh -s -- --setup # irm https://raw.githubusercontent.com/lucas-rus/seamlock/main/install.ps1 | iex (From source with Rust >= 1.90: cargo install seamlock-cli && seamlock setup.)
Run a parallel team on any repository:
# 1. Inspect existing worktrees or plan parallel ticket clusters seamlock worktrees --base main seamlock plan --rev HEAD # 2. Launch coordinated parallel agents with live contract + region coherence seamlock run --tasks tasks.json --mode enforce --regions --test-cmd "npm test" # 3. Watch live coordination in another terminal seamlock watch .seamlock/runs/ Why Seamlock
Git worktrees isolate parallel agents from overwriting each other's files, but they do not prevent agents from breaking each other's code:
28% of AI-agent pull requests on GitHub hit merge conflicts (AgenticFlict).
Two cooperating agents succeed ~30% less often than one agent doing both tasks (CooperBench).
The hardest bugs are invisible to git: patches that "pass alone but fail together".
# 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)) Both branches touch different files, merge cleanly in git, and pass their own tests—then crash at runtime with TypeError: send_email() missing 1 required keyword-only argument: 'user_id'. Meanwhile, a third agent rewriting only the body of another function in notify/email.py would be blocked unnecessarily by a file lock.
Seamlock treats each agent's worktree like a CPU cache and each symbol like a cache line:
Inferred footprints. Hooks and worktree diffs map what each agent actually reads, writes, and calls onto a live symbol graph—no manual file claims required.
Contract vs. body. Every symbol is split into its public contract (signature, type, schema, route) and its body. Body edits never block anyone. Contract edits are classified as compatible (informational notice) or breaking (short lease + targeted notice).
Live region coherence and finish gate. Overlapping edits in the same file are resolved live—pure two-sided insertions via AST-verified union, genuine collisions via region ownership and hand-offs. An agent cannot finish while it depends on a stale contract or unresolved conflict.
Speculative integration and verification. Branches are merged in finish order, checked with Tier-2 type checkers (tsc, pyright, cargo check, go vet) and your test command, with $O(\log k)$ bisection on regressions and an auditable Merge-Readiness Pack (mrp.md / mrp.json).
Evaluated in seamlock-bench. On 12-agent CommonMark (652 official spec examples), uncoordinated parallel agents (parallel-off) collapse to 199/652 (~9 merge conflicts, ~302 integration-loss regressions), while a single sequential agent takes 65.1 min (3.1× slower than Seamlock, 651.2/652). Rather than comparing against sequential, the table below benchmarks Seamlock head-to-head against the strongest baseline: parallel-integrator (the same parallel agents in isolated worktrees, followed by an extra AI Integrator agent that resolves all merge conflicts and fixes regressions).
Latest Benchmarks (DeepSeek V4.1 Flash + Pre-Registered Baselines)
All DeepSeek runs use opencode-go/deepseek-v4.1-flash with default Seamlock (--mode enforce --regions --trim-outputs) and list-price API cost (protocol). Across every suite, Seamlock achieved 0 merge conflicts where the integrator had to resolve 1–10 conflicts per run:
On 12-agent CommonMark, Seamlock is 37% faster, uses 22% fewer tokens, and costs 14% less than an AI merge integrator on DeepSeek—and with our latest early-read tracking and MRO fixes on hy4-flash, reaches 652/652 in 16.3 min (4.0× faster than sequential, $0.41/run). On the 6-agent polyglot full-stack suite, the current engine cuts wall time by 34% and total tokens by 31% compared to v0.3.0 (8.8 min vs 13.3 min, 7.7M vs 11.1M), running faster and using fewer total tokens than the integrator.
Why Every Layer Matters (21-Run Controlled Ablation Study)
To verify whether simpler coordination mechanisms—whole-file locks, passive overlap warnings, or turning off individual Seamlock layers—could achieve the same result, we ran 7 conditions interleaved across 3 rounds (21 valid runs, 12-agent CommonMark, opencode-go/hy4-flash; full report):
Contract vs. body separation cuts notice volume 7.3× (329.7 → 45.0), serialisation 3.7× (25.1% → 6.8%), and wall time 31% (23.5 → 16.3 min).
Live notices + finish gate are both required: removing notices adds +9.5 min and +16M tokens while dropping accuracy (605.7/652); removing the gate collapses accuracy to 503.7/652.
Whole-file locks (fileleases) and passive warnings (overlaps) fail badly (309.7/652 and 246.3/652, 6.3 unresolved conflicts each)—locking a file stalls other agents (15.9% vs. 6.8% serialisation) without integrating the lock holder's commits into waiting worktrees.
Release & Benchmark History
Each milestone was validated empirically on seamlock-bench before shipping as default:
All pre-registered protocols, raw logs, bootstrap CIs, and Mann–Whitney U / Cliff's δ tests live in seamlock-bench.
1. Lean Seamlock vs. AI Integrator (opencode-go/hy4-flash-free, n = 3 interleaved; report):
Seamlock was faster, used fewer coordination tokens, and cost less in all nine pairings (Cliff's δ = −1.00, p = 0.10, the minimum possible with n = 3).
2. Main baseline study vs. Sequential & Uncoordinated Parallel (opencode-go/hy4-flash-free, n = 5 interleaved, pre-lean gate; report):
Pre-registered tests (Mann–Whitney U, Holm-corrected): region coherence vs. parallel-off on examples passed (H1) and integration loss (H2), and vs. sequential on wall time (H3) all reached Cliff's δ = ±1.00, p = 0.03.
On all 560 Python feature pairs of CooperBench, Seamlock's textual merge results agree with CooperBench's own gold conflict report on 560/560 pairs:
24% of pairs share files but touch disjoint symbols, so a file lock would serialize them needlessly.
12% are contract-coupled, and only 1% have call sites that violate the updated contract.
Interference between gold human patches is rare (0 of 48 evaluable jinja pairs fail together); live coordination shows its impact on agent patches (see the live suites above).
Details: eval/rq1/results.md.
Seamlock runs locally next to your repository as a 12-tool MCP server.
Automatic (auto-detects OpenCode, Claude Code, Codex CLI, Cursor, Windsurf, Gemini CLI, VS Code / Copilot, Antigravity): seamlock setup
Any other MCP client (Cline, Roo Code, Zed, Continue, etc.): Add a standard stdio MCP server running seamlock mcp (or npx -y seamlock mcp).
OpenAI Codex CLI (~/.codex/config.toml): seamlock setup --client codex
OpenCode (CLI): opencode mcp add --global seamlock -- seamlock mcp --agent-cli opencode
Claude Code (plugin with MCP server + seamlock-team skill): /plugin marketplace add lucas-rus/seamlock /plugin install seamlock@lucas-rus-seamlock
Antigravity (~/.gemini/config/mcp_config.json, then restart): seamlock setup --client antigravity All planning, inspection, and merge tools run directly inside Antigravity. seamlock_run launches parallel workers via OpenCode or Claude Code (--agent-cli opencode|claude).
Requires Rust >= 1.90 (if building from source) and git >= 2.38 (2.44+ recommended for git merge-file --diff-algorithm; Seamlock warns and falls back cleanly on older git).
seamlock setup # auto-connect OpenCode, Claude Code, Cursor, Antigravity seamlock plan --rev HEAD # identify shared hubs & producer-first parallel clusters seamlock symbols src/ # symbol contracts & spans (Py, TS/JS, Rust, Go, C/C++, Schemas) seamlock diff old.py new.py # contract vs. body changes between two versions seamlock worktrees --base main # inspect all active git worktrees (incl. uncommitted edits) seamlock analyze --base main b1 b2 --json # check branches for silent contract breaks (for CI & scripts) seamlock typecheck --repo . # auto-detect & run Tier-2 checker (tsc, pyright/ty, cargo, go vet) seamlock merge --base main b1 b2 --type-check # contract-ordered smart merge + verified union + type check seamlock mrp .seamlock/runs/
git clone https://github.com/lucas-rus/seamlock && cd seamlock cargo build --release examples/running-example/setup.sh /tmp/seamlock-demo ./target/release/seamlock analyze --repo /tmp/seamlock-demo --base main agent-a agent-b agent-c --notices View demo output (cross-file breaking parameter detection) 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 [seamlock] 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 Watch a Team Live
seamlock watch .seamlock/runs/ # follow the latest run in a live terminal dashboard seamlock watch .seamlock/runs/ --web # open live coordination graph in the browser seamlock watch .seamlock/runs/ --once # print one snapshot (useful for logs) seamlock 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 GitHub Cross-PR CI Action
Drop action.yml into any GitHub Actions workflow to cross-check concurrently open pull requests for silent contract breaks:
- uses: lucas-rus/seamlock@main with: base: main Architecture
flowchart LR subgraph Agents A1["Agent 1 (worktree w1)"] A2["Agent 2 (worktree w2)"] An["Agent n (worktree wn)"] end subgraph Coherence layer FT["Footprint tracker"] SG["Symbol graph (contracts / bodies / uses)"] CD["Coherence directory (leases, versions, notices)"] end SI["Speculative integrator (merge-tree, type-check, tests)"] IQ["Integration queue"] A1 & A2 & An -- "hook events, diffs" --> FT --> SG --> CD CD -. "notices, finish gate" .-> A1 & A2 & An FT --> SI --> CD CD --> IQ --> main[("main")] Crate Role Coverage seamlock-core Symbols, contract/body change classification, coherence protocol (leases, duplicate-symbol guard, negotiation, finish gate), pairwise analysis, exhaustive BFS model checker Complete seamlock-lang Tree-sitter and schema front-ends: normalized contracts, body digests, imports, reference resolution, HTTP route linking, affected-test graph Python, TS/JS, Rust, Go, C/C++, Schemas seamlock-git Git plumbing: tree reading, in-memory merge-tree, patience/diff3 verified insertion-union, worktree snapshots and listing Complete seamlock-cli seamlock binary: setup, plan, symbols, diff, analyze, worktrees, typecheck, merge, mrp, run, watch, mcp (12 MCP tools + authenticated TCP daemon) Complete Supported languages: Python (.py, .pyi), TypeScript/JavaScript (.ts, .tsx, .mts, .cts, .js, .jsx, .mjs, .cjs, including @/... and ~/... tsconfig root aliases), Rust (.rs), Go (.go), C/C++ (.c, .h, .cc, .cpp, .cxx, .hh, .hpp, .hxx), schema/API contracts (.sql, .prisma, .proto, OpenAPI .json/.yaml), and cross-language HTTP routes (FastAPI/Flask/Express/Next.js App Router ↔ fetch/axios). Other file types still participate in textual/structural merge checks and file-existence guards.
Docs: Design · Tech Stack · Roadmap · Related Work · Contributing · Security
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Released: Dec 5, 2026
Author: Lucas-Michael Rus-Gheorghiu
All 5 files in this release have provenance metadata.
View provenance details
Apache Software License, MIT License (MIT OR Apache-2.0)
ai agents git mcp merge parallel coherence
Development Status 4 - Beta
Intended Audience Developers
License OSI Approved :: Apache Software License
OSI Approved :: MIT License
Topic Software Development :: Version Control :: Git
Release files for seamlock 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 65.9 MB
Release files / seamlock-0.3.5-py3-none-win_amd64.whl
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Release files / seamlock-0.3.5-py3-none-manylinux_2_17_x86_64.whl
Security for seamlock 0.3.5
All 5 files in this release have been uploaded with provenance metadata.
With provenance seamlock-0.3.5-py3-none-win_amd64.whl Dec 5, 2026
Attestation for seamlock-0.3.5-py3-none-win_amd64.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 5, 2026 5 release files Full provenance
Dec 2, 2026 5 release files Full provenance
Dec 2, 2026 4 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 4d99e05











