On CLOSED readyState, probes session and redirects to /login only on 401. On CONNECTING, counts consecutive errors and closes + probes only after 3 failures, preventing infinite retries without killing transient reconnects. Closes #203 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>