agentHost: correct reconnect handling found in review
- Keeps the connection entry when a transport drops during the handshake. The protocol client moves to `reconnecting` and schedules its own retry before it rejects the original connect, so disposing the entry cancelled that retry and discarded the client replay state. - Settles a pending connection wait when a soft reconnect restores the transport. The wait previously ran to its timeout even though the host was reachable again. - Counts reconnect attempts before recording the next one, so a policy of `maxAttempts: n` performs n attempts. The Dev Container policy of 3 attempts performed 2, and a policy of 1 performed none. - Follows an in-flight dial in `waitForConnection` instead of a fixed timeout. An SSH host can install the remote CLI first, which takes longer than the WebSocket-scale limit, and the caller received a timeout while that attempt continued and later succeeded. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
C
Connor Peet committed
3f9243c072956d0246d6977b3046db7d79cdae03
Parent: c827957