René's URL Explorer Experiment


Title: coder ssh: Coder Connect path has no dial timeout, no health check, no tailnet fallback · Issue #24006 · coder/coder · GitHub

Open Graph Title: coder ssh: Coder Connect path has no dial timeout, no health check, no tailnet fallback · Issue #24006 · coder/coder

X Title: coder ssh: Coder Connect path has no dial timeout, no health check, no tailnet fallback · Issue #24006 · coder/coder

Description: coder ssh --stdio via the Coder Connect path has no dial timeout, no connection health monitoring, and no fallback to tailnet when the tunnel is broken. This causes VS Code SSH reconnection to hang for ~55 minutes and then fail permanent...

Open Graph Description: coder ssh --stdio via the Coder Connect path has no dial timeout, no connection health monitoring, and no fallback to tailnet when the tunnel is broken. This causes VS Code SSH reconnection to hang...

X Description: coder ssh --stdio via the Coder Connect path has no dial timeout, no connection health monitoring, and no fallback to tailnet when the tunnel is broken. This causes VS Code SSH reconnection to hang...

Opengraph URL: https://github.com/coder/coder/issues/24006

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"coder ssh: Coder Connect path has no dial timeout, no health check, no tailnet fallback","articleBody":"`coder ssh --stdio` via the Coder Connect path has no dial timeout, no connection health monitoring, and no fallback to tailnet when the tunnel is broken. This causes VS Code SSH reconnection to hang for \\~55 minutes and then fail permanently after laptop sleep.\n\n## Environment\n\n* macOS (Apple Silicon), VS Code 1.113.0, Remote SSH 0.123.2026033115 (pre-release)\n* Coder Connect active (workspace reachable via `fd60:` IPv6 prefix)\n\n## What happened\n\nThe connection dropped several times over a few hours. Each time, VS Code reconnected in 3-8 seconds. Two of the drops showed \"Connection closed by remote host\" (workspace side actively closed); the others were silent. This instability needs workspace-side logs to diagnose.\n\nOn the fatal attempt, the Coder Connect tunnel was broken but DNS still resolved:\n\n```\nt+0s     SSH spawns coder ssh --stdio as ProxyCommand\nt+2s     coder ssh resolves workspace, ExistsViaCoderConnect() does DNS lookup for fd60:... → resolves → true\n         Commits to Coder Connect path, calls runCoderConnectStdio()\n         net.Dialer{}.DialContext(\"tcp\", \"fd60:...:22\") — no timeout set\n         ... TCP dial hangs for 55 MINUTES (macOS default TCP timeout) ...\nt+55m    macOS TCP stack: \"connect: operation timed out\", coder ssh exits\n         SSH process dies, VS Code attempts reconnection but the session is already lost\n         → \"Reload Window\"\n```\n\nThe laptop was put to sleep during the hang. When it woke the next morning, the stale TCP timeout error was already waiting.\n\n## Root cause\n\n### 1\\. [`ExistsViaCoderConnect`](\u003chttps://github.com/coder/coder/blob/main/codersdk/workspacesdk/workspacesdk.go>) is DNS-only\n\n```go\nfunc ExistsViaCoderConnect(ctx context.Context, hostname string) (bool, error) {\n    ips, err := resolver.LookupIP(ctx, \"ip6\", hostname)\n    // Only checks: does the hostname resolve to a fd60: prefix address?\n    // Does NOT verify the address is actually reachable.\n}\n```\n\nA broken tunnel with working DNS causes `coder ssh` to commit to the Coder Connect path with no way to fall back.\n\n### 2\\. [`runCoderConnectStdio`](\u003chttps://github.com/coder/coder/blob/main/cli/ssh.go>) has no dial timeout\n\n```go\nfunc runCoderConnectStdio(ctx context.Context, addr string, ...) error {\n    dialer := testOrDefaultDialer(ctx)  // &net.Dialer{} — zero timeout\n    conn, err := dialer.DialContext(ctx, \"tcp\", addr)\n    if err != nil {\n        return xerrors.Errorf(\"dial coder connect host: %w\", err)  // fatal, no retry\n    }\n    agentssh.Bicopy(ctx, conn, &StdioRwc{...})  // bare io.Copy, no health check\n    return nil\n}\n```\n\nNo `Timeout` on the dialer, so the only limit is the OS TCP stack (\\~55 min on macOS). On failure, `coder ssh` exits with no retry and no fallback to tailnet.\n\n### 3\\. No health monitoring on Coder Connect path\n\n\u003c!-- linear:table-colwidths:400,400,200 -->\n|  | Coder Connect path | Tailnet path |\n| -- | -- | -- |\n| Dial timeout | None (OS default, \\~55 min macOS) | Context-based |\n| Health check | None | `setStatsCallback()`: pings every 3s, exits after 1 min of failures |\n| Workspace monitoring | None | `watchAndClose()`: watches workspace lifecycle via SSE |\n| Reconnection | None | Tailnet controller retries with backoff (50ms-10s) |\n| Fallback | None | DERP relay fallback if P2P fails |\n\n### 4\\. No tailnet fallback\n\nThe Coder Connect path is a hard `return` ([`cli/ssh.go:387`](\u003chttps://github.com/coder/coder/blob/main/cli/ssh.go>)):\n\n```go\nif exists {\n    return runCoderConnectStdio(...)  // if this fails, coder ssh exits\n}\n// tailnet path below is unreachable\n```\n\n## Suggested fixes\n\n1. **Add a dial timeout.** Wrap the Coder Connect attempt in a 30s context timeout so it fails fast instead of hanging for 55 minutes.\n2. **Fall back to tailnet on Coder Connect failure.** If `runCoderConnectStdio` errors, fall through to the `DialAgent` tailnet path instead of exiting.\n3. **Add health monitoring.** TCP keepalive or a periodic check similar to the tailnet path's `setStatsCallback`. Without this, a mid-session tunnel death is only detected when `io.Copy` returns (very slow on half-open TCP).\n4. **Consider a reachability check in** `ExistsViaCoderConnect`. A quick TCP connect (5s timeout) before committing would catch the broken-tunnel-with-valid-DNS case upfront.\n\nFixes 1-2 would also be partially covered by a general retry loop in `coder ssh` (see [ENG-2345](https://linear.app/codercom/issue/ENG-2345/coder-ssh-add-retry-loop-for-transient-connection-failures)).","author":{"url":"https://github.com/EhabY","@type":"Person","name":"EhabY"},"datePublished":"2026-04-03T09:39:25Z","url":"https://github.com/coder/coder/issues/24006"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:70ac045b-29d6-e430-e16b-b3f543029f63
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB6B4:23CF06:2D700BE:39E1E6A:6B01AA04
html-safe-nonce4b2a704f0b109bd66a9cec4891749fb18ac0ec8212feb51dc30e5cd0c360e421
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkI0OjIzQ0YwNjoyRDcwMEJFOjM5RTFFNkE6NkIwMUFBMDQiLCJ2aXNpdG9yX2lkIjoiODcwMDY5MjcxNjUwMzI4MDEzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac9de978d7eb61a740bcce2cbbd821ebaab6ac256526977cf15234cfd588c316e0
hovercard-subject-tagissue:4199568480
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/24006/issue_layout
twitter:imagehttps://opengraph.githubassets.com/adb9e3e78ec77dbf46d6f4c33179746050291508936750083877fe1736ea0550/coder/coder/issues/24006
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/adb9e3e78ec77dbf46d6f4c33179746050291508936750083877fe1736ea0550/coder/coder/issues/24006
og:image:altcoder ssh --stdio via the Coder Connect path has no dial timeout, no connection health monitoring, and no fallback to tailnet when the tunnel is broken. This causes VS Code SSH reconnection to hang...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameEhabY
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/24006#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F24006
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F24006
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/24006
Reloadhttps://github.com/coder/coder/issues/24006
Reloadhttps://github.com/coder/coder/issues/24006
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/24006
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/24006
#24015https://github.com/coder/coder/pull/24015
coder ssh: Coder Connect path has no dial timeout, no health check, no tailnet fallbackhttps://github.com/coder/coder/issues/24006#top
#24015https://github.com/coder/coder/pull/24015
https://github.com/EhabY
https://github.com/EhabY
EhabYhttps://github.com/EhabY
on Apr 3, 2026https://github.com/coder/coder/issues/24006#issue-4199568480
ExistsViaCoderConnecthttps://github.com/coder/coder/blob/main/codersdk/workspacesdk/workspacesdk.go
runCoderConnectStdiohttps://github.com/coder/coder/blob/main/cli/ssh.go
cli/ssh.go:387https://github.com/coder/coder/blob/main/cli/ssh.go
ENG-2345https://linear.app/codercom/issue/ENG-2345/coder-ssh-add-retry-loop-for-transient-connection-failures
EhabYhttps://github.com/EhabY
on Apr 3, 2026https://github.com/coder/coder/issues/24006#event-24178540782
https://github.com/spikecurtis
spikecurtishttps://github.com/spikecurtis
on Apr 6, 2026https://github.com/coder/coder/issues/24006#issuecomment-4192649055
https://github.com/EhabY
EhabYhttps://github.com/EhabY
on Apr 6, 2026https://github.com/coder/coder/issues/24006#issuecomment-4192748379
https://github.com/EhabY
EhabYhttps://github.com/EhabY
on Apr 6, 2026https://github.com/coder/coder/issues/24006#issuecomment-4193241239
#24010https://github.com/coder/coder/pull/24010
EhabYhttps://github.com/EhabY
completedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#24015https://github.com/coder/coder/pull/24015
on Apr 7, 2026https://github.com/coder/coder/issues/24006#event-24275316866
pullhttps://github.com/apps/pull
on Apr 8, 2026https://github.com/coder/coder/issues/24006#event-24277733156
fix(cli): add dial timeout and keepalive for Coder Connect (coder#24015)https://github.com/edisplay/coder/commit/027c222e82527bc35705f96337a0d33bc17046d1
coder#24015https://github.com/coder/coder/pull/24015
https://docs.github.com/articles/closing-issues-via-commit-messages
027c222https://github.com/edisplay/coder/commit/027c222e82527bc35705f96337a0d33bc17046d1
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/24006
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/24006
EhabYhttps://github.com/EhabY
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.