- message_agent takes optional `constraints` and `expecting`; the teammate reads them as labelled
"Constraints:" / "Reply needed:" lines under the message.
- A teammate that ends a request turn silent or empty after writing its answer elsewhere (beside a
tool call, or in a message_agent back to the sender) has those last words relayed once, marked
"[no final reply; their last message this turn:]". Notify-only and non-bot deliveries keep silence.
- A turn its own gateway's stop/restart interrupted is a failed receipt ("its gateway stopped or
restarted mid-turn ... not run again"), not `cancelled`: nobody cancelled it.
- Every live-lane completion and the fan-out join lead with `outcome`: "@beta answered." or
"@gamma never answered: <why>" plus whether resending is safe; a wait that lapses on an unreachable
owner says so (target_state "unreachable"); a busy teammate's ack says it takes the request next.
split_targets deduplicated a comma list by the local bot each name resolves to. With a
registered peer "mini" and a local bot whose friendly name is "Mini", "mini, qa" collapsed to one
entry, but dispatch sends "mini" to the peer: the local teammate got nothing and was missing from
the ack and the combined reply.
Each name now resolves in dispatch's order (peer target, connection-qualified relay name, local
bot) and the list is deduplicated by (transport, recipient).
message_agent's cancel picked an admission from the target's receipt file and cancelled it with
prompt.cancel. When the first attempt had just failed transiently, the owner's one automatic retry
could be scheduled but not yet recorded: the cancel hit the finished first attempt, and the retry
then ran anyway.
The cancel is now an owner RPC, bot_relay.cancel {id, profile, author_id}
(gateway/session_bot_cancel.py). It runs under the mailbox lock that admits the retry, follows the
retry when it exists, and otherwise withdraws it for good: the receipt's retry is marked refused
"cancelled", so no wake, re-delivery or owner restart admits it, and the receipt reads cancelled.
Only the delivery's own principal and author may cancel it.
Review round on the message_agent fan-out:
- The runner's sub-processes get stdin=DEVNULL (the TUI subprocess stdin guard).
- Each spec entry names how its runner reports: only the live lane prints a
delivery record; a relay or peer reply that looks like JSON stays the reply.
- A failing text runner keeps its stderr; one that says "do not resend" (a peer
turn accepted but still running, a relay reply past its budget) is pending.
- Recipients are deduplicated by the bot each name resolves to, and a friendly
name containing a comma still resolves whole before the list split.
- One target's setup or launch failure stays that target's entry: requests
already admitted still get the combined waiter.
- Cancel follows the delivery's automatic retry when the first attempt ended
while the receipt was still pending, and says so when the retry is not
recorded yet instead of reporting "already finished".
- target accepts up to 8 comma-separated teammates: each is admitted as before, and one
combined runner joins their reply runners and wakes the sender ONCE with a typed outcome per
teammate (settled/failed/cancelled/pending + reply/error/reason/target_state).
- expects_reply=false: the message is marked "[no reply needed]" after the attribution colon and
no reply runner starts (local: the payload and intent go once the owner admitted it; relay: no
waiter; peer: the sending runner runs unwatched), so nothing wakes the sender.
- cancel=<delivery_id>: the sender withdraws its own queued request, or stops the exact turn it
started, through the owner's prompt.cancel; the receipt's author must be the caller.
- The owner's deliver answer carries target_state (idle/working/waiting_approval/
waiting_clarify/paused, never stored); the ack says plainly when the teammate is parked on its
own user, and a runner whose wait lapses pending re-reads it through a same-id replay instead
of ending on a silent timeout.
- One reply path (#95074): message_agent refuses a DM to the bot whose delivery this turn
answers, since its final response already goes back. Protocol v3 names fan-out and notify-only.