Skip to main content

Module batch

Module batch 

Source
Expand description

One window for several agents (SPEC_COUNTDOWN_BUTTONS_AND_BATCH_AGENT_ACTIONS_2026_10_28.md §4). A Stop agents over five agents is one request: one deadline, one OS notification (“Closing 5 agents: A, B, C and 2 more in 30 s”) with Keep running and Close now for all of them, and one audit entry. Each agent’s own pane keeps its banner, and its Keep running keeps that agent only.

A block that already has an active request joins that one, as it always did; only the blocks no request covers are put in the new one.

Constants§

GROUP_PREFIX 🔒
The notification group of a batch’s toast: it is no one block’s, so the request is its own.

Functions§

block_name 🔒
The name the user knows the agent in block_id by.
group 🔒
keep_member 🔒
“Keep running” on one agent’s banner of a batch: that agent leaves the request and the others and the clock are untouched. When none is left the request is kept_by_user. None when the request is not a batch or the block is not one of its agents (the whole-request keep applies).
mark_all_kept 🔒
The whole request kept (the toast’s Keep running): every agent still in it is recorded as kept.
raise_toast 🔒
The OS notification of a batch: what will happen to how many, the time left, and the two buttons.
request_batch
Ask to close blocks (agent tabs) behind one window. Returns one view per block, in order: the blocks put in the new request share its id (each view names its own block and agent), the others are whatever request already covered them. With fewer than two blocks free it is the ordinary request per block.
run 🔒
Close each agent still in the request, all at once as separate requests would have, and record how each ended. The request’s own status is failed if any close failed (with each error named), else shut_down if any closed, else superseded.
subject 🔒
What a toast calls the agents closing, within the notification’s name limit: lark, or 5 agents: A, B, C and 2 more with as many names as fit.
summary 🔒
A: kept_by_user, B: shut_down: the outcomes as the audit note keeps them.