Skip to content

feat(remote): offer a support bundle when the remote connection fails - #1245

Open
EhabY wants to merge 1 commit into
mainfrom
feat/support-bundle-on-ssh-failure
Open

EhabY wants to merge 1 commit into
mainfrom
feat/support-bundle-on-ssh-failure

Conversation

@EhabY

@EhabY EhabY commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #970.

VS Code has no API that reports a lost remote connection. When it gives up, VS Code shows "Cannot reconnect. Please reload the window.", and Devin, Antigravity, and Cursor show their own UI or nothing. Every editor logs the decision to the window log (renderer.log), so the extension now reads new lines from that log and offers a support bundle when the editor gives up.

  • Initial connection and management connection failures prompt right away.
  • An extension host failure waits 3s, because VS Code restarts the extension host after a 2s check. A logged restart cancels the prompt. Restarts are logged at info level, so above Info this case is skipped.
  • On a failure, the extension flushes its buffered debug logs and emits ssh.connection.failed.
  • The failure stays stored, per deployment, until a bundle is saved or the user dismisses the notification. Otherwise, such as when the window reloads first or the bundle fails while offline, the next successful connection offers it again, for up to a day. Signing out clears it.
  • Create Support Bundle runs the existing coder.supportBundle command.
  • Support bundles now include the window log and logs from Cursor Glass workspaces (window<N>_wb<K>).

Code, in src/connectionFailure/:

  • parseWindowLogLine turns a log line into an event.
  • LogFileReader returns new complete lines and handles rotation and locked files.
  • ConnectionFailureMonitor decides that the connection failed and fires onDidFail once.
  • ConnectionFailurePrompt stores the failure and shows the notification. It waits for a working connection before offering a stored failure. remote.ts connects the two.

Known limits:

  • Detection depends on VS Code's internal log text. Each pattern links to its source, and tests pin each editor's lines.
  • Nothing is detected when the window log level is Off.
  • Each deployment stores one failure. If two workspaces on the same deployment fail at the same time, answering one prompt also clears the other's stored failure, so a reload doesn't offer it again.

Related: #1244 fixes Cursor's port detection and workspace label.

Generated by Coder Agents on behalf of @EhabY.

@EhabY
EhabY force-pushed the feat/support-bundle-on-ssh-failure branch 2 times, most recently from f7ee1ce to 3994517 Compare December 4, 2026 15:46
@EhabY
EhabY marked this pull request as ready for review December 4, 2026 18:21
@EhabY
EhabY force-pushed the feat/support-bundle-on-ssh-failure branch from 864b692 to f9beb31 Compare December 4, 2026 18:36
@EhabY
EhabY requested a review from jeremyruppel December 4, 2026 18:37
VS Code has no API that reports a lost remote connection, but it logs
the decision to give up in the window log. ConnectionFailureMonitor
reads new lines from that log and reports the first failure, and
ConnectionFailurePrompt offers a support bundle. The failure stays
stored per deployment until a bundle is saved or the user dismisses
the offer, and the next successful connection offers it again for up
to a day.

Support bundles now include the window log and logs from Cursor Glass
workspaces.
@EhabY
EhabY force-pushed the feat/support-bundle-on-ssh-failure branch from f9beb31 to fe3ac00 Compare December 4, 2026 18:49

This branch has not been deployed

No deployments
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.

Prompt to create support bundle before Reload Window on SSH failure

2 participants