Give the active-session handoff one owner: closeSession captures wasActive before its await and the session_deleted handler stands down for a close this tab started. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>