Skip to content

v0.1.0 — open source, early

Gitamesh

The coordination mesh for autonomous coding agents.

Gitamesh prevents duplicate work, conflicting implementations, and stale-worker races when multiple AI agents — Claude Code, Codex, Cursor, remote workers — operate across repos, branches, and worktrees at the same time.

The problem

More agents, same repo, no traffic control.

Run one AI coding agent and coordination is trivial. Run five against the same repo and you get races that look like flaky CI until you trace them back to two workers editing the same thing at once.

Duplicate task claims

Two agents pick up the same ticket at once and both start writing code for it — one run is wasted, sometimes both are wrong.

Overlapping file edits

Independent agents touch the same files or modules in parallel, and their changes land in conflicting, hard-to-reconcile diffs.

Stale workers publishing late

An agent loses its lease — timeout, crash, network blip — but keeps working anyway, and its output lands after a newer attempt already won.

Orphaned jobs after crashes

A worker dies mid-task with no heartbeat and no handoff, leaving the task stuck claimed forever with nothing to reclaim it.

How it works

Four primitives, one coordination engine.

  1. 01

    Atomic claims

    A task or resource can be claimed by exactly one agent at a time — the claim itself is the coordination point, not a convention agents have to honor.

  2. 02
    #41#40

    Monotonic fencing tokens

    Every claim carries a strictly increasing token, so a stale writer's late arrival is provably older than the current holder's — and gets rejected.

  3. 03

    Leases with heartbeats

    Claims expire unless renewed. A crashed or hung agent's lease lapses on its own, and the task becomes reclaimable without manual intervention.

  4. 04
    > CLAIMED> HEARTBEAT> RELEASED> COMPLETED> CLAIMED> HEARTBEAT> RELEASED> COMPLETED

    Append-only event log

    Every claim, heartbeat, and completion is an immutable event with a cursor — state is derived, replayable, and reconnect-safe end to end.

Quickstart

Register the repo, register an agent, claim a task.

The gitamesh CLI talks to a running daemon over HTTP for agent/task/lock operations, and to git directly for repo/worktree status — no daemon required for local checks.

terminal
$ pnpm add -g @gitamesh/cli
$ gitamesh init --daemon-url http://127.0.0.1:4477
$ gitamesh doctor
✔ git repository detected
✔ daemon reachable at http://127.0.0.1:4477
✔ token valid (scopes: agent, task, claim)
 
$ gitamesh repo register --display-name "gitamesh"
$ gitamesh agent register \
--display-name "claude-code-1" \
--runtime "claude-code" \
--capability "typescript" --capability "test"
 
$ gitamesh task create \
--workflow-id wf_default \
--repository-id repo_gitamesh \
--title "Fix flaky worktree test" \
--priority high
 
$ gitamesh task claim <taskId> \
--agent-id <agentId> \
--workspace-session-id <sessionId>
# exactly one caller gets the claim — every other
# attempt fails fast with a 409, fencing token intact

Every read command supports --json for scripting. Full command reference in packages/cli/README.md.