Skip to content

herdr --remote exits with EAGAIN handshake error on high-latency links (~750ms RTT) #753

Description

@punkhop
  • I confirm this is a reproducible bug, not a feature request, idea, question, contribution proposal, or direction check.

Current behavior

herdr --remote <host> --session <name> fails to attach over a high-latency link (~750ms RTT). It exits immediately:

herdr: protocol error: I/O error: Resource temporarily unavailable (os error 35)
Error: Custom { kind: Interrupted, error: "remote client exited with exit status: 1" }

Server log on each attempt: client connected client_id=N ... render_encoding=TerminalAnsi immediately followed (~4ms) by client disconnected client_id=N, no server-side error. Client log: connecting to server path=...sock with no following handshake succeeded. On a low-latency link the same command logs handshake succeeded version=14 encoding=TerminalAnsi and attaches.

The EAGAIN (os error 35) is a non-blocking read returning WouldBlock during the handshake — the client gives up before the server's reply crosses the ~750ms link.

Expected behavior

herdr --remote completes the handshake and attaches, same as on a fast link. The link is healthy (0% packet loss; plain ssh and VNC to the same host work), the reply just takes ~750ms. The handshake read should wait for / poll the reply instead of treating the first WouldBlock as fatal.

Reproduction

  1. Add ~700ms RTT to the client→server link (real: satellite/airplane wifi; synthetic: macOS Network Link Conditioner, or dnctl pipe with delay 350ms each direction).
  2. From an interactive terminal: herdr --remote <host> --session <name>.
  3. It exits immediately with the error above. At <50ms latency the same command attaches normally.

Impact

Can't attach to a remote herdr session from any high-latency link (planes, some cell/satellite). Workaround is ssh -t <host> 'herdr session attach <name>', which connects but loses the bridge's clipboard-image paste.

Environment

  • Herdr version: 0.7.0 (client and server), protocol 14, compatible: yes
  • Update channel (stable or preview): stable
  • Operating system: macOS (both ends)
  • Terminal: Ghostty
  • Shell, if relevant: zsh
  • Relevant config, if any: connection over Tailscale, DERP-relayed; ping RTT min/avg/max = 665/749/929 ms, 0% loss

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions