Replies: 2 comments
|
Valid report — and timely: this is the same family as a relative-root bug we just fixed in #204 (roots re-resolving against cwd). Your two ideas separate into "share one mailbox across worktrees" and "detect an accidental split", and they get different treatments: Sharing a root across worktrees already works today — Divergence detection: agreed AMQ should fail louder, but not in Tracking both (docs + doctor check) as follow-ups. |
|
Resolved in two landed layers. PR #204 ( |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I hit a silent footgun with git worktrees.
AM_ROOTresolves relative to cwd (.agent-mail/<session>), so two agents using the same session name from different worktrees of the same repo land in different mailbox trees. The result is thatamq whoshows the peer as stale, andamq senddrops into a mailbox the peer never reads, so delivery silently fails and the drained receipt just times out. It took me a while to realize the messages were going to a different tree entirely.Two ideas, either one would help:
An opt-in mode to anchor the root at the repo's common git dir (
git rev-parse --git-common-dir) so all worktrees of one repo share one mailbox. I'd keep per-worktree isolation as the default, since running separate agent teams per feature branch is legitimately useful.A divergence warning: when sending to a peer on session X, if that peer's most recent presence for session X is under a different resolved root, warn instead of silently queuing to a dead mailbox.
The warning alone would have saved me a couple of hours here. Thoughts on whether either fits the model you have in mind?
All reactions