Expand description
A leader is told when an agent that owes it work has gone quiet (docs/specs/SPEC_LEADER_TOLD_WHEN_AN_AGENT_GOES_QUIET_2026_11_21.md, phase 1).
An agent is watched while it owes work: it holds a claimed Kanban task (not on hold, not waiting on an answer), or it is a spawned worker that has not reported to its leader since the leader last messaged it. It is quiet when it has done nothing for the quiet time: no output, no message sent, no update of a task it holds. A sweep every 30 seconds reads that from memory (no model call, no poll of the agent): an agent between turns gets one nudge (a system turn) and, five minutes after it, its watchers are told; a turn that is still running and has written nothing for the longer running time gets its watchers told, with no nudge.
The decision (Watch::step) is pure, so the timeline is tested with a fake clock; sweep reads the stores
and the controllers and delivers.
Structs§
- Limits
- The three times, from settings.
- Mute
- A leader’s mute of one agent: its quiet clock is stopped until
until_ms, then runs again from there. - Owed
Task - A task an agent holds.
- Quiet
View - An agent that is quiet now, as the Swarm and the Kanban show it (the
quietgroup of the live facts). - Reading
- What the sweep read about one agent that owes work.
- Watch
- The quiet episodes of the agents that owe work, by agent.
Enums§
- Action
- What a quiet agent is owed.
Constants§
- MAX_
MUTE_ MINUTES - The most minutes a leader may mute one agent for.
- SETTING_
QUIET_ ESCALATE_ MINUTES - How long after the nudge (or, for a running turn, after its quiet time) the watchers are told, in minutes.
- SETTING_
QUIET_ MINUTES - The quiet time of an agent between turns, in minutes; 0 turns the whole feature off.
- SETTING_
QUIET_ RUNNING_ MINUTES - The quiet time of a turn that is running, in minutes.
Functions§
- ask_
answered - Whether an urgent ask is answered: the recipient messaged the sender since (
replied_ms), updated or completed a task it named (a held task that moved since), or none of the tasks named is waiting on it any more (done, handed elsewhere or cancelled). Pure. - callable
- Whether an agent in this state can be called quiet: it is working or idle. A question waiting for the user, an agent that cannot run (stopped, failed, limited, signed out) and one with no state are told another way.
- claimed_
by_ holder - The claimed tasks of every holder, keyed by the holder’s uid, or
name:<lowercased claimed_by>when the holder’s uid is not known: the key the Swarm’s facts use. A task on hold, waiting on a question, in review, done or open is not claimed and is not here. - holding_
for_ quota - Whether the agent holds on purpose while quota mode is tight: it set its own
waitingstatus line (the leader’s note would only cost the leader a turn to read “idle by design”). The clock is stopped for as long as that line is its current one and the mode stays tight. - install
- Start the sweep. Called once from
main, besideworker_notes::install. - leads
- Whether
callerleadstarget(both agent uids): it is the lead of the target’s seat, which for a spawned worker is the agent that spawned it. Only a lead may mute. - limits_
from - The limits in
extra, orNonewhen the feature is off (agents:quietminutesof 0 or below). - mute
- Mute
def_idforminutes(1 toMAX_MUTE_MINUTES) fromnow_ms, replacing an earlier mute of it. - mute_of
- The mute of
def_idin force atnow_ms, if any. - owed_by
- The tasks the agent
defholds. - paused_
activity - What the agent’s status line and a mute add to its clock (unix ms; 0 for nothing). A new status line is something
the agent did, so it counts at the time it was set. A
waitingline with its time, and a mute, stop the clock: while one is in force the agent counts as active now, and when it ends the clock runs again from its end. - quiet_
body - The note to a watcher about the quiet agent
name. - quiet_
view def_idas the last sweep found it, when it was quiet.- read_
claimed - Every claimed task, on every board and with no row limit, read once for a sweep or a note: a limit on the board’s rows would cut off the oldest, which are the tasks of the agents that have been quiet longest. Empty when the read fails.
- sweep
- One look at every agent that owes work.
- unmute
- Lift the mute of
def_id; whether there was one in force. - watcher_
panes - The panes that watch the agent
def_id: its seat’s lead and its spawned-worker leader (when open on this machine), and the open pane of each agent that filed a task infilers. Never its own pane, each once.