SIGN IN SIGN UP

repl: Retry iopub connection on failure (#62358)

## Context

This is a rebase of #52302, which was approved by @Veykril in May but
still needed a rebase before it could be merged — it seems the original
author @MostlyKIGuess forgot about it. I rely on this fix daily for REPL
over SSH on an unstable connection and need it rather urgently, so I
cherry-picked the original commit (with authorship preserved) and
resubmitted it as a new PR.

Closes #51834
Supersedes #52302

## How to Review

The code itself was already reviewed and approved in #52302. This PR
only rebases it onto latest `main`, with one simple conflict resolution
against #53014: when all retries are exhausted, the error now uses the
improved message from that PR (suggesting `pip install ipykernel` on the
remote host) instead of the plain one. Comparing this diff against the
original PR's diff should make the review straightforward.

## Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- repl: Fixed iopub connection failures over SSH on slow or unstable
connections by retrying with exponential backoff.

Co-authored-by: mostlykiguess <bruvistrue93@gmail.com>
Y
Yxxx committed
be52d3b757cf7f1113e3e4b9766a87eed9cb6a8a
Parent: 803467f
Committed by GitHub <noreply@github.com> on 8/8/2026, 2:59:07 PM