After the saga: purge the blockโs persisted broker history and lift the
respawn guard. If the block somehow survived (dispatch failed), it keeps
its stopped state and can be closed again.
Close block_ids (normally every member of one paneโs stack). Ids that no
longer exist are skipped; ids in different tabs are rejected. On success
returns {"tab_id": "...", "block_ids": [...closed...], "leaf_removed": bool}.
Clear session:active_pid (so the next boot doesnโt read this as an
interrupted session) and mark the local instance row stopped. The session
id itself is left everywhere it is โ block meta, instance row, shared
registry โ so reopening the agent resumes it (spec ยง4.2 step 6).
Serialises tab closes within one workspace, from delete_tabโs last-tab
pre-check through its DeleteTab dispatch (spec ยง9.5). One lock per
workspace id; entries are tiny and bounded by the number of workspaces.