Expand description
Overlap notes, the pure half
(docs/specs/SPEC_AGENT_OVERLAP_AWARENESS_2026_10_10.md §3.3, file half):
when an agent edits a file, which other agents have the same
(repository, repository-relative path) uncommitted or edited it in the
last EDITED_WINDOW_MS; the note that says so; and the rate limits that
keep those notes rare. The runtime half (when to check, fetching facts,
delivering) is overlap_notes.
Structs§
- Claim
Ref - Another agent’s live claim on the file or a folder above it
(
ClaimWork,super::claims). - Edited
File - The file an agent just edited, placed in a repository.
- Overlap
- Another agent working on the same file.
- PrOverlap
- How another agent works on files of a PR being opened: one clause per
way, e.g.
has uncommitted changes in a.rs,changes b.rs on its branch x. - Rate
Limiter - Remembers what each agent has been told, so notes stay rare: one per
(agent, other agent, repository, path) per
PAIR_QUIET_MS, at mostWINDOW_NOTESper agent perWINDOW_MS, then one summary and quiet until that window ends. Agents are keyed by name, case-insensitively. - Window 🔒
Enums§
- Decision
- What to tell an agent about one overlapping file.
- Overlap
Kind - How another agent is working on the same file.
Constants§
- EDITED_
WINDOW_ MS - Another agent’s edit counts for this long.
- FILES_
NAMED 🔒 - PAIR_
QUIET_ MS - At most one note per (agent, other agent, repository, path) this often.
- PR_
NOTE_ 🔒AGENTS - Agents named in a PR note; the rest are counted.
- RECHECK_
MS - The same agent’s edits of the same file are checked at most this often.
- WINDOW_
MS - At most
WINDOW_NOTESnotes per agent in this window; the next one is a summary, then nothing until the window ends. - WINDOW_
NOTES
Functions§
- ago 🔒
- “just now”, “1 minute ago”, “25 minutes ago”.
- claimed 🔒
- The claim, as a clause:
claimed crates/srv in o/r 40 minutes ago ("presence work"). - doing 🔒
- What another agent did to the file: “has uncommitted changes in it”, “edited it 5 minutes ago”.
- files_
phrase - Up to
FILES_NAMEDfiles, then a count:a.rs, b.rs, c.rs and 2 more. - locate
- Where
path(absolute, as the edit tool named it) is: the editor’s own clone first, then any other known clone.Nonewhen it is in no known repository, so there is nothing to compare across clones. - note_
text - The note for one file. One other agent:
[AgentMux] Agent4 also has uncommitted changes in crates/srv/src/main.rs (repo o/r, branch agent4/x). Message them before changing it.or... Agent5 also edited crates/srv/src/main.rs 12 minutes ago (...). Several are listed in one note. - overlaps
- Every other agent with
fileuncommitted, or edited in the lastEDITED_WINDOW_MS. The editor itself (me_agent, by name in any channel, so its own other clones and instances too) is left out. One entry per agent, uncommitted first. - pr_
note_ text - The note for a PR being opened from
branchwhose files other agents are working on:[AgentMux] The PR you are opening from agenty/x changes files other agents are working on: Agent4 has uncommitted changes in a.rs; Agent5 changes b.rs on its branch agent5/y. Message them …. - summary_
text - The note that ends an agent’s window: this file’s overlap, how many files overlapped in the window, and that nothing more comes until it ends.
- system_
note 🔒 - One
[AgentMux]note aroundbody. The body carries text srv did not write (other agents’ names, branches and paths, a claim’s note and topic), so all of it is quoted (quote_in_system_note): only this prefix can be a marker, and the note stays one line. - with_
claims - Add the live claims that cover
file(super::claims::covering) tofound: to the claimer’s entry when it also changed the file, else as aOverlapKind::Claimedentry of its own. One claim per agent, the narrowest (longest path).