Coord layer
The coord layer was extracted from years of running multiple Claude Code / Cursor / Codex sessions against the same checkout. It solves three failure modes that hit you the moment you run more than one agent at a time:
- Commit contamination: Agent A’s unstaged changes get swept into Agent B’s commit
- Overlapping edits: both agents edit the same file, and the second write clobbers the first
- Submodule-pointer thrash: Agent A bumps a submodule pointer, and Agent B unwittingly folds the wrong bump into a commit
How it works
Section titled “How it works”Three primitives on disk, plus hook scripts wired into Claude Code / Cursor / Codex + git:
.harnery/active/<id>.json: heartbeat per agent, declaring what files are claimed.harnery/events.ndjson: canonical append-only event log underflock, surfaced live by the web UI
The hooks fire before an edit lands (claim time) and before a commit lands (commit time), block conflicts, and emit structured events.
The agent sees nothing when nothing’s going wrong. Single-agent runs are indistinguishable from no coord layer at all.
Cross-machine presence
Section titled “Cross-machine presence”The primitives above are machine-local. When more than one machine shares a
repo (two people, or one person on a desktop and a laptop), presence closes
the gap: each machine publishes its live sessions to
refs/harnery/presence/<machine> on the repo’s own origin (zero config: repo access is the credential), and peers render them in the agents list,
status box, and peer tables, labeled @<machine>. An optional
end-to-end-encrypted relay upgrades latency from minutes to seconds. Remote
peers are advisory in v1: they inform, they don’t block claims. Details:
harn presence and
decision record 0016.