Skip to main content

Overview

Locking prevents simultaneous edits at two levels:
  • Symbol level for TypeScript and JavaScript, using the symbol graph. Two agents can edit the same file as long as they touch different functions or classes.
  • File level for everything else, or when a change spans an entire file.
Whichever level applies, the flow is the same: an edit creates a reservation; a conflicting edit from another session is denied with a specific message.

How Reservations Work

If Agent B instead touches refreshToken in the same file, no conflict — the write goes through and creates a separate symbol reservation.

Reservation Rules

Coexistence with must-tier Conventions

preToolUse runs two checks in parallel:
  1. Reservation conflict (someone else holds this file/symbol).
  2. Convention match (must-tier rule matches this file + change).
Either one can deny the write, and the message explains which.

IDE Support

Viewing Reservations

  • Dashboard — workstream view shows owned files and symbols per member.
  • sync — returns a reservations array in the response.
  • APIGET /workspaces/:id/reservations.

When You Really Need Someone’s Symbol

Open a negotiation. Actions include yielding the symbol, holding it, deferring, proposing a split, or counter-offering — all within a bounded number of turns so the conversation doesn’t stall.

Why Not Just Use Git?

Git catches conflicts at merge time, after hours of duplicate work. Enagrams catches them at write time — before the first conflicting line is written — and gives agents the protocol to resolve them immediately.