stops cleanly,
or crashes
yes
no
no
yes
noticed on the next check
running
takes one turn per messageholds a file lock the whole time
the operating system releases the lock
— a dead agent can't hold one,so being alive can't be faked
the reaper
checks each agent's lock, on a timer
is the lock still held?
it's gone — any messages still waiting in its queue?
restart it, so nothing is stranded