Skip to main content

Module note_outbox

Module note_outbox 

Source
Expand description

One note to a leader about every agent of its that needs a look (docs/specs/SPEC_LEADER_TOLD_WHEN_AN_AGENT_GOES_QUIET_2026_11_21.md §7).

A note about a watched agent (quiet, failed, exited, waiting on a question) is queued under its leader’s pane and the agent. The first note into an empty window opens it; whatever else arrives for that leader within WINDOW_MS joins it (a later note about the same agent replaces its line), and the window leaves as one note. A note that must be heard now (no wait key: a failure, an exit, a question) goes out at once when the leader’s window is empty, so a lone failure is never delayed. A window of one line is the note it always was.

The decision (Outbox) is pure and takes the time as an argument, so it is tested with no clock and no runtime; queue and flush_due hand what is due to worker_notes::deliver, and worker_notes::install’s tick calls flush_due.