Handler-side _inflight_agent_runs drops in the handler finally on cancellation while the run_in_executor thread lives on, letting the SessionDB close gate observe zero live runs under a live writer. Count the worker lifetime itself (increment before run_in_executor, decrement in the worker finally) and gate _stop_quiesce_and_close_session_dbs on it alongside ctx.api_live. Fixes #116535