CROSS-AGENT COORDINATION LAYER·ZERO OVERWRITES

Build at Machine Speed. Without File Collisions.

Git coordinates humans committing minutes apart. Latch coordinates autonomous AI agents editing the same files in real time — exclusive write locks, dependency blast radius checks, and live causal patch sync.

Zero Cloud Lock-in·Local Daemon on Port 3001·Open Source Core
latch-session: main (3 parallel agents)
Synchronized
Active Agents
Claude Code
Claude Code
editing auth.ts
Cursor
Cursor
running tests
Copilot
Copilot
refactoring ui/
Codex CLI
Codex CLI
updating deps
src/auth/token_engine.tsLEASE: 18s
// Exclusive lock held by Claude Code
export async function verifySessionToken(
token: string
): Promise<SessionRecord> {
const lock = await latch.acquireMutex("auth");
return await decryptClaims(token, lock);
}
AST Validated1 lock held · 0 queued
Lock Type:EXCLUSIVE_MUTEX
AST Collision:0.00% Zero
Sync Pulse:0.8ms Local
01 // The Problem

AI agents are fast. But they don't coordinate.

When multiple agents edit the same repository in parallel, they overwrite each other's changes, hallucinate broken AST interfaces, and destroy work.

No filesystem lock coordination
Zero awareness of other running agents
Silent code clobbering & broken builds
Designed for solo developers, not agent swarms
Merge Conflict Detected (No Latch)
// src/auth.ts · concurrent edits clobbered
<<<<<<< Claude Code: rewrite session handler
======= Cursor: inline token verification
>>>>>>>
02 // The Solution

A real-time coordination layer for machine-speed coders.

Latch wraps your repository in a distributed AST lock engine and causal patch bus. Agents request locks before editing and synchronize AST boundaries.

Sub-millisecond exclusive file mutex leases
AST dependency blast-radius bounding
Real-time causal patch streaming via vector clocks
Stop hook protocol integration for all major agents
File Mutex
0ms Overwrite Rate
AST Blast
Bounded Radius
Causal Clock
Lamport Order
Zero Lock-in
Local Daemon :3001
Live Protocol SimulationSocket: Active (0.8ms latency)
latch-telemetry-feed: port 3001
Real-time Causal Bus
14:22:01.082CursorLOCKEDsrc/engine/lock_table.rs
14:22:01.194Claude CodeBLOCKEDsrc/engine/lock_table.rs
Wait for Cursor release (TTL: 14s)
14:22:01.450AntigravitySYNCEDcrates/ast/parser.rs
14:22:02.108CursorRELEASEDsrc/engine/lock_table.rs
Evolution Timeline
CHRONOLOGY·20212026

The Evolution of
Autonomous Coding Agents

Over five years, AI coding evolved from inline autocomplete into autonomous multi-agent teams. Each orbit represents the emergence of major AI agents.

2021
GitHub CopilotInline tab autocomplete
2024
Cursor & Claude CodeAutonomous multi-file repository editing
2026
Latch Coordination EngineP2P file locks & collision-free agent swarms
Click an agent badge to inspect
How It Works
03 // System Architecture Flow

How Latch Orchestrates The Swarm

Autonomous agents connect to the local Latch daemon. Write intentions are checked in sub-milliseconds against AST dependency graphs before any code hits disk.

1. Concurrent AI Agents
Claude Code

Claude Code

CLI

Editing session token engine

Cursor IDE

Cursor IDE

IDE

Refactoring auth API endpoints

Copilot CLI

Copilot & Codex

AGENT

Generating AST unit tests

Latch Core Daemon

Local Mutex Engine & Causal Arbiter

Port 3001 Socket
2. Coordination Primitives

Exclusive File Mutex

0ms

Auto-expiring heartbeat lease

AST Blast Radius

TREE

Tree-sitter module boundary lock

Causal Patch Bus

SYNC

Lamport ordered live disk patch

System Architecture
Core Architecture

Engineered for Multi-Agent Swarms

Four synchronization primitives designed for simultaneous autonomy across heterogeneous models.

Pillar 01 // P2P ZERO-COLLISION MUTEX

Exclusive File Locks

When Cursor, Claude Code, or Codex edits a file, Latch grants a short-lived lease with active heartbeat renewal. Concurrent agents are paused or routed around the locked file.

Sub-millisecond lease acquisitionAuto-expiry TTL safety netPre-flight claim verification
Pillar 02 // DEPENDENCY GRAPH PARSING

Blast Radius AST Analysis

Changing an interface signature shouldn't break other parallel agents. Latch parses the codebase AST graph and manages locks across dependent symbol hierarchies.

Tree-sitter AST parserUpstream & downstream lock propagationCross-agent intent warning
Pillar 03 // LAMPORT VECTOR CLOCKS

Causal Patch Synchronization

Patches broadcast across local sockets or Supabase channels. Git coordinates commits minutes apart; Latch synchronizes in-flight file edits in real time.

Causal ordering verificationInstant disk reload via Stop HooksZero phantom overwrites
Pillar 04 // CROSS-SESSION PERSISTENCE

Shared Agent Memory Ledger

Tool invocations, test failures, and architectural decisions are indexed in shared agent memory. New agents inherit full codebase context immediately.

Compile brief summariesLive file lock audit logStop hook automatic synchronization
Quick Start

Two Commands to Initialize Your Swarm

bash / zsh terminal
$npm install -g @latch/cli
$latch login
$latch init
$latch serve
> [LATCH DAEMON] Initialized on 127.0.0.1:3001
> [STOP HOOKS] Installed to Cursor, Claude Code, and Codex CLI
> [STATUS] Swarm arbitration ready (0.00% collision guarantee)
Access Tiers
Access Tiers

Start for Free. Scale with Your Swarm.

Free and open-source for solo engineers. Cloud state persistence and telemetry for engineering teams.

Tier 01 // Solo

Community

$0/ forever free

Complete local daemon with zero cloud lock-in. Full support for Cursor, Claude Code, and Codex on your machine.

  • Up to 3 concurrent local AI agents
  • Sub-millisecond AST file mutex locks
  • Basic local Stop Hooks integration
  • Community GitHub discussions
Recommended for Swarms
Tier 02 // Engineering Teams

Pro Swarm

$24/ seat · month

Persistent cloud state arbitration for high-throughput AI engineering swarms with live telemetry dashboards.

  • Unlimited concurrent AI coding agents
  • Cloud Supabase state persistence & audit logs
  • Tree-sitter AST dependency blast radius analysis
  • Real-time team telemetry dashboard & lock inspector