run_closing_notices, with claim generations and retry backoff up to 15 minutes.
After sixteen attempts, about three hours, a notice that still cannot be sent is
withheld with the reason recorded, rather than retried forever.
Terminal capture requires an inbound trigger and no later conversation answer,
but has no age cutoff: an old run can become terminal after a long outage.
This loop runs with either execution backend and independently of the
run-worker setting. Existing execution recovery owns hung workers and deadlines;
the supervisor does not reopen terminal work or extend its allowance.
Each send still requires the current agent, installation, source, and destination
to authorize it. Scheduled
work keeps its own notification lifecycle. A declined continuation stays closed
while its acknowledgement is generated; unavailable generation retains a pending
notice and never reopens the declined work. The reply slot is recorded before sending, so a crash or
lost acknowledgement cannot repeat a task, an earlier reply, or the closing
notice. Notice states distinguish pending generation, confirmed sends, withheld
authorization, and uncertain sends. If all configured LLM routes are unavailable,
generation remains pending; no computed substitute is sent. An offline instance
or unavailable messaging provider cannot deliver an immediate notice.
An authenticated in-conversation stop cancels execution before acknowledgement
I/O. Its terminal write retains a separate obligation in run_stop_notices.
The same supervisor composes that acknowledgement from verified cancellation
facts, without task text, tools, or the cancelled execution’s lease. Unavailable
generation remains pending across restarts with bounded backoff. A current source
and destination check precedes the single reserved send; a lost send or commit
acknowledgement never reopens the notification slot. Operator stops and unrelated
cancellations do not create these obligations. Sending a stop acknowledgement
does not resume the task, mark it complete, or establish that files were saved.
A paused task that exhausts its allowance or deadline without a usable reply
retains its checkpoint while closing generation is pending. A confirmed closing
notice carries the task’s run stamp into conversation history and publishes the
continuation for a later requester decision. A reply rejected by continuation
processing ends through closing recovery rather than spending more model rounds.
A confirmed delivery retains its immutable event and external message identifier
independently of the history write in continuation_delivery_receipts. If graph
recording fails, the supervisor checks the owning agent and original route, then
retries capture and continuation publication without a model call or connector
send. The next sweep removes receipts after publication or the task’s existing
hold expires; capture recovery never extends that hold. Unavailable receipt
storage cannot prove delivery and never authorizes resending.
Durable allowance and scope settlements also store a generation receipt before
speaking. Legacy computed receipts are treated as pending input, never delivered
as prose. A current source check precedes generation and draft publication;
unavailable generation keeps the same Temporal operation pending without
resuming work or renewing its allowance.