The tool CLI now re-reads discovery.json for up to ~1.2s (300ms + 900ms) when it
connects during an app restart. It covers a missing or partially written
file, a dead port, and a stale token (AUTH_FAILED or "Authentication
required"), plus a socket that closes during auth/verify. Identity is
port + token + pid, so a bridge restarted on the same port is retried. When
every attempt fails, the original error is surfaced unchanged.
Supersedes #3785. Refs #3443.
Co-authored-by: GOUKI9999 <11640942+GOUKI9999@users.noreply.github.com>