bf94f05a8e
When the active js-debug child exits or terminates while other tree sessions remain alive, #activeSessionId pointed at the dead child and every subsequent tool action failed. Reassign to a live tree session (preferring stopped, then non-root) on exited/terminated/proc-exit. Regression test proves threads route to the surviving session.