feat(send): an ambient send now says who it did NOT wake - #5
Merged
Conversation
MX-148. `sent (ambient) -> room` is true and completely uninterpretable. It
returns cleanly, the room's message count rises — which is the check AGENTS.md
prescribes for the `--room` typo, and it passes here — and the message really is
in the room. What it never said is that nobody was woken.
So an orchestrator broadcast "the slot is FREE, take it" to three idle workers
holding finished PRs, and stalled its own queue with a free box and three ready
PRs until the next tick noticed. Nothing was lost or misrouted: "in the room" and
"delivered" are simply different states, and only one causes work to happen.
The count is knowable at send time and is the one fact that would have made it
visible, so it is printed:
sent (ambient) -> room — stored for recv/log, woke NOBODY. 2 other member(s)
NOT woken, 1 of them IDLE. An idle thread will not see this until it looks;
if the message contains an INSTRUCTION, resend with --to <thread-id>.
IDLE rather than membership is what matters: an active thread reaches the room on
its own turn, an idle one never does.
The status probe is CAPPED at 8 members. This is the hot path of every ambient
send and this machine regularly sits at load 50+ with bb dropping writes
(MX-138/MX-146); a broadcast to a large room must not become a burst of API
calls. Above the cap the honest answer is the membership count, which costs none.
Verified against the deployed plugin on a real room with a known mix — 2 other
members, 1 idle — and on a scratch room, which reports "no other members".
tsc clean, 17 tests pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MX-148.
sent (ambient) -> roomis a true and completely uninterpretable receipt.It returns cleanly, the room's message count rises — which is the check AGENTS.md prescribes for the
--roomtypo, and it passes here — and the message really is in the room, readable by anyone who looks. What it never said is that nobody was woken.So an orchestrator broadcast "the slot is FREE, take it" to three idle workers holding finished PRs, and stalled its own queue with a free box and three ready PRs. Nothing was lost or misrouted: "in the room" and "delivered" are different states, and only one causes work to happen.
The fix is the ticket's own suggestion
The count is knowable at send time and is the one fact that would have made this visible, so it is printed:
IDLE rather than membership is what matters. An active thread reaches the room on its own turn; an idle one never does.
The probe is capped at 8 members, deliberately
This is the hot path of every ambient send, and this machine regularly sits at load 50+ with bb dropping writes (MX-138 / MX-146). A broadcast to a large room must not become a burst of API calls. Above the cap the honest answer is the membership count, which costs no calls at all.
Verified against the deployed plugin
sent (ambient) -> mx148-probe — no other memberstsc --noEmitclean, 17 tests pass. The probe message wakes nobody by construction, which is why it was safe to send to a live room.🤖 Generated with Claude Code