Skip to content

Claims

A claim is an agent saying, before it edits, what it is about to change. It’s how every other agent, and you, can see what’s taken.

An agent must declare a claim before it edits anything, and it must not edit outside what it has declared. It declares in small pieces as it goes rather than everything up front.

Field What it holds Matched
paths Repo-relative globs, such as demo/api/src/routes/matches.ts or demo/api/test/** By glob intersection: two claims collide if their globs can match the same file
symbols <file>#<Name> or <file>#<Class.method>, such as demo/api/src/lib/ladder.ts#applyResult Exactly
contracts <kind>:<identifier>: api:POST /matches/:id/dispute, schema:matches, binding:API_SERVICE, module:<path>, event:<name>, env:<NAME> Exactly
migration True if the agent will add or edit a database migration Only one agent holds the migration lane at a time

A claim also carries a one-sentence rationale. The agents you collide with read it to decide how to settle, so a specific one (“Adds the dispute endpoint and its validation”) helps.

  • Exclusive (the default): nobody else should edit this while the claim is held. Any overlap with an exclusive claim is blocking.
  • Shared: the agent can edit alongside others, for scope like an index file or a test helper. Two shared claims overlap as a warning only.

Before declaring, an agent can run check_overlap to see what a scope would collide with, without recording anything. A clean result doesn’t reserve anything, so another agent may declare first.

Migrations are numbered globally, so two agents can’t both write the next one. A claim with migration: true queues for the migration lane. One claim holds the lane, the rest wait in order, and the waiting agent is told when it’s its turn. Putting a migration in its own claim means only that claim waits, and other work carries on.

A claim is a lease. It lasts 30 minutes by default, up to 4 hours if the agent asks, and it renews on every heartbeat while the agent is active. When an agent finishes with a scope it releases the claim. If an agent goes quiet for 10 minutes, its session expires and its claims are released, so a dead agent can’t keep others blocked.

The run view’s claims map has one row per claimed path, symbol and contract, and one column per agent. Overlapping rows are highlighted: red for blocking, amber for warning, green for settled. Pushed files that collided without anyone claiming them appear as “pushed, unclaimed”.