Files in use
A file is in use while an agent is editing it. Any other agent about to edit it is warned first. Nothing is locked.
How a file comes into use
When an agent edits a file, it holds it, and the file shows as held by ‹agent›. You declare nothing. Reading doesn't count.
Claude Code and Cursor report each edit as it happens. The daemon picks up Codex and Kiro edits, including ones made through shell commands.
Worktrees count as one repo: src/api.ts in a second worktree is the same file as in the main checkout.
How long it lasts
15 minutes after the agent's last edit of the file, or until the agent ends. Each edit restarts the clock. When an agent ends, even by a crash or a closed terminal, its files are released.
What other agents see
An agent about to edit a file another live agent holds gets this first:
⚠ COORD: src/x.ts is being edited by b7e1 (claude, branch feat/b) 2m ago
→ b7e1 has this file (since 9m ago). Wait, work elsewhere, or message them: coordigent.message.send { to: "b7e1" }The agent that started editing first has priority and continues. The other waits, works elsewhere or sends a message. On a tie, the lower agent id wins. Priority passes on when the holder stops editing the file for 15 minutes or ends. To hand it over sooner, the holder sends a message.
Each machine works out priority from its own agents' edits and the start times the server reports for teammates'. Both agents reach the same answer without asking, once both edits are seen. A teammate's, Codex or Kiro edit can take a few seconds to appear.
The warning never blocks the edit of an agent someone is watching. The same warning for the same file and holder repeats at most every 5 minutes. A headless run Coordigent started, with no one watching, is the exception: when another agent was in the file first, its edit is stopped, with the warning as the reason, every time it tries until the file is free.
| Client | Warned |
|---|---|
| Claude Code | Before the edit |
| Codex | Before an apply_patch edit; at its next prompt for other edits |
| Cursor | Just after the edit |
A warning after the edit says "is also being edited by".
Signed in, teammates' files count too. Your machine keeps a fresh copy, so no network call is needed. If two agents edit the file anyway, that is a conflict.
Ask who has a file
Before rewriting a file others depend on, ask who has it, across every machine and agent app:
coord who src/auth/session.ts docs/api.mdCOORD · who · 1 of 2 in use
────────────────────────────────────────────────────────────────────────────────
src/auth/session.ts ⚠ conflict · owned by @acme/auth
you · claude · laptop · branch main · “Fix the login redirect” · last edit 2m ago · has priority since 9m ago
Ada · codex · ada-desktop · branch rename · “Rename the session store” · last edit 1m ago
docs/api.md — no one
→ in use = edited in the last 15m · teammates as of 3s ago- Each holder: person, app, machine, branch, task, last edit.
⚠ conflict: two agents have it, or the project has an open conflict on it.has priority: the one that started editing first.- The last line says how old your copy of teammates' agents is.
--jsonfor scripts. It always exits 0.
Code owners. With a .github/CODEOWNERS, CODEOWNERS or docs/CODEOWNERS, each line names the file's owners, matched GitHub's way on your checkout. No login or GitHub access needed. In Claude Code and Cursor, an agent about to edit a file whose rule names owners, none of them you, is told first. It blocks nothing:
⚠ COORD: payments/charge.ts is owned by @acme/payments (CODEOWNERS), not by youAgents ask with coordigent.files.who, which returns the same holders and owners. They needn't ask before every edit; the warning reaches them anyway. See MCP tools.
Where you see it
- CLI. The live view's FILES IN USE pane.
coord claimsprints files in use per agent;coord sessionsshowsN files in useper agent. - VS Code. The Files in use view. A held file gets a dot and tooltip in the Explorer, its tab and its gutter, and one notice the first time you type in it.
- Website. Each agent's record lists its files and edits. Conflicts list their files.
coord claims