Skip to content

fix(hub): a closing message still wakes the room when it carried a question - #84

Merged
lvndry merged 1 commit into
mainfrom
fix/closing-message-wakes-peers
Sep 20, 2026
Merged

lvndry merged 1 commit into
mainfrom
fix/closing-message-wakes-peers

Conversation

@lvndry

@lvndry lvndry commented Sep 20, 2026

Copy link
Copy Markdown
Owner

What was broken

An agent whose turn both said something and ended in <end> woke nobody. In orchestrator.said() the wake and the close were one condition, so a message that shared its turn with a goodbye was treated as pure silence. A direct question asked in the same breath as signing off left the room live with no one dispatched to answer it — the peer saw the words but was never given a turn.

Confirmed in a real room: one agent asked its counterpart a direct question and closed in the same turn; the counterpart was never dispatched, and the room sat open forever holding an unanswered farewell.

What changed

  • The wake and the close are now decided separately. The author still bows out on <end>, and poke()'s bowed-out guard still refuses to re-dispatch it — but a closing message that carried content wakes the room once so the question gets answered. No ownership boundary crossed: the leaver is not re-woken by the reply.
  • A bare goodbye stays silent. A message that is nothing but the farewell wakes nobody, the same as a <pass>. The hub can't tell — it only holds the sealed blob — so the bridge sets a new optional bareGoodbye on the say frame when the plaintext is the sentinel alone.
  • Bow-out wording. The other side already learns an agent left via the budget frame's bowedOut list; the copy now says the agent won't reply until its owner brings it back, rather than implying the exchange can continue.

How to verify

  • bun test packages/hub/src/orchestrator.test.ts — two new cases: a content-bearing goodbye dispatches the peer; a bare goodbye dispatches no one. Full suite: 565 pass.
  • bun run typecheck — clean.
  • Manually: in a two-agent room, have one agent answer with a question plus <end>. The peer is now dispatched and answers; the room shows the first agent has said goodbye and won't reply until its owner returns.

🤖 Generated with Claude Code

…estion

A turn that both said something and ended in a goodbye woke nobody: the
wake and the close were the same condition, so a direct question that
shared its turn with <end> left the room live with no one dispatched to
answer it. Decide the two separately — the author still bows out, but a
message that carried content still wakes the room once.

A bare goodbye (nothing but the farewell) stays silent, like a pass. The
hub cannot tell, since it only holds the sealed line, so the bridge sets a
new `bareGoodbye` flag on the say frame when the plaintext is the sentinel
alone.

The bow-out was already surfaced to the other side via the budget frame's
bowedOut list; its wording now says the agent won't reply until its owner
brings it back.
@vercel

vercel Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
quartet Ready Ready Preview Sep 20, 2026 8:30am UTC

@lvndry
lvndry merged commit 8ab47d0 into main Sep 20, 2026
5 checks passed
@lvndry
lvndry deleted the fix/closing-message-wakes-peers branch September 20, 2026 08:34

This branch was successfully deployed

1 active deployment
Preview — 654e8196 Deployed Sep 20, 2026 by vercel[bot]
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