Skip to content

Replace coord file watchers with peer messaging - #184

Open
astex wants to merge 1 commit into
masterfrom
coord-doorbell
Open

Replace coord file watchers with peer messaging#184
astex wants to merge 1 commit into
masterfrom
coord-doorbell

Conversation

@astex

@astex astex commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Coordination files were doing double duty as both the durable state record and the wakeup mechanism, via a watch.sh process per file. Peer messaging replaces the wakeup half: the file stays the source of truth, and a one-line SendMessage acts as a doorbell pointing at it. That drops one background process per child, and it lets a child log freely during review instead of staying quiet to avoid waking the parent for nothing.

Addressing works without any new plumbing. A parent lists peers before and after spawn_tab and takes the new row, recording it in the child's coord file as a Session header; in worktree projects the session name is the branch name plus a suffix, which serves as a cross-check. Since an agent can't see its own name, the parent bootstraps the reverse direction by sending a hello, which the child answers by copying the from attribute into a Parent session header.

The tradeoff is that wakeup is no longer fail-safe. A watcher fired on any write; a doorbell only rings if the writer remembers, and there is no timeout behind it. So every skill now states that writing an entry and ringing are a single step, and that a directive nobody rings for is never read. Hand-editing a coord file also no longer wakes the tab, which seems fine given chat is the better channel for human input anyway.

Touches both the git and nogit variants of delegate, work-as-subtask, and implement-iterate, plus GENERATION.md, tournament, and adversarial. watch.sh is deleted, and config.rs now removes the stale copy older installs wrote so no agent can find it and fall back to polling.

🤖 Generated with Claude Code

Coordination files were doing double duty as both the durable state
record and the wakeup mechanism, via a watch.sh process per file. Peer
messaging replaces the wakeup half: the file stays the source of truth,
and a one-line SendMessage acts as a doorbell pointing at it. That drops
one background process per child, and lets a child log freely during
review instead of staying quiet to avoid waking the parent.

Addressing works without any new plumbing. A parent lists peers before
and after spawn_tab and takes the new row, recording it in the child's
coord file as a Session header. Since an agent can't see its own name,
the parent bootstraps the reverse direction by sending a hello, which
the child answers by copying the from attribute into a Parent session
header.

The tradeoff is that wakeup is no longer fail-safe: a watcher fires on
any write, while a doorbell only rings if the writer remembers, so every
skill now treats writing and ringing as a single step. Hand-editing a
coord file also no longer wakes the tab; chat is the channel for human
input.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant