Skip to content

fix: add ProxyCommand retry wrapper for sleep/wake reconnection#872

Open
EhabY wants to merge 1 commit intomainfrom
fix/proxy-command-retry
Open

fix: add ProxyCommand retry wrapper for sleep/wake reconnection#872
EhabY wants to merge 1 commit intomainfrom
fix/proxy-command-retry

Conversation

@EhabY
Copy link
Copy Markdown
Collaborator

@EhabY EhabY commented Apr 2, 2026

  • After sleep/wake, DNS resolution often fails transiently (systemd-resolved not ready). When coder ssh fails instantly, the Remote SSH extension sees unparsable output and throws a permanent SshResolverError.Create(), showing "Reload Window" instead of retrying.
  • This wraps the SSH ProxyCommand with a POSIX shell retry script that retries up to 10 times with 5s delays on quick failures (<10s runtime). The 5s sleep is long enough for the machine to fully suspend during it, so when it wakes, sleep returns immediately and the next retry succeeds with DNS working.
  • Skipped on Windows (POSIX shell only). Falls back gracefully to the unwrapped command if the script can't be written.

After sleep/wake, DNS resolution often fails transiently (systemd-resolved
not ready). When `coder ssh` fails instantly, the Remote SSH extension sees
unparsable output and throws a permanent SshResolverError.Create(), showing
"Reload Window" instead of retrying.

This wraps the ProxyCommand with a POSIX shell retry script that retries up
to 10 times with 5s delays on quick failures (<10s runtime). The 5s sleep
is long enough for the machine to fully suspend during it, so when it wakes,
sleep returns immediately and the next retry succeeds with DNS working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant