Skip to content

recent_projects: Fix remote reconnect when server is not running#49834

Merged
Veykril merged 1 commit intozed-industries:mainfrom
mangas:fix/remote-reconnect-server-not-running
Feb 23, 2026
Merged

recent_projects: Fix remote reconnect when server is not running#49834
Veykril merged 1 commit intozed-industries:mainfrom
mangas:fix/remote-reconnect-server-not-running

Conversation

@mangas
Copy link
Contributor

@mangas mangas commented Feb 22, 2026

Closes #49363

When an existing remote workspace's connection is dead (e.g. the server died and reconnect failed, leaving the client in ServerNotRunning state), remote_connection() returns None. Previously this caused an error dialog, blocking reconnection — the user had to manually switch to another project and back to recover.

Now the code falls through to establish a fresh connection instead, matching the previous behavior where clicking "Reconnect" would just work.

Release Notes:

  • Fixed remote reconnect failing with an error when the server is not running, now establishes a fresh connection instead.

When an existing remote workspace's connection is dead (e.g. server died
and reconnect failed, leaving the client in ServerNotRunning state),
`remote_connection()` returns `None`. Previously this caused an error,
blocking reconnection. Now the code falls through to establish a fresh
connection instead.
@cla-bot
Copy link

cla-bot bot commented Feb 22, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @mangas on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Feb 22, 2026
@mangas
Copy link
Contributor Author

mangas commented Feb 22, 2026

@cla-bot check

@cla-bot
Copy link

cla-bot bot commented Feb 22, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @mangas on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot
Copy link

cla-bot bot commented Feb 22, 2026

The cla-bot has been summoned, and re-checked this pull request!

@mangas
Copy link
Contributor Author

mangas commented Feb 22, 2026

Tested manually and it works for me. Let me know if there's anything else to get it merged.

@mangas
Copy link
Contributor Author

mangas commented Feb 22, 2026

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 22, 2026
@cla-bot
Copy link

cla-bot bot commented Feb 22, 2026

The cla-bot has been summoned, and re-checked this pull request!

@mangas
Copy link
Contributor Author

mangas commented Feb 22, 2026



2026-02-22T17:19:30+00:00 WARN  [remote::remote_client] remote heartbeat: connection activity channel has been dropped. stopping.
2026-02-22T17:19:30+00:00 ERROR [remote::remote_client] proxy process terminated unexpectedly: 255
2026-02-22T17:19:30+00:00 INFO  [remote::remote_client] setting state to 'reconnecting'
2026-02-22T17:19:30+00:00 INFO  [remote::remote_client] Trying to reconnect to remote server... Attempt 1
2026-02-22T17:19:30+00:00 ERROR [remote::remote_client] Reconnect attempt 1 failed: failed to connect: ssh: connect to host 192.168.5.135 port 22: Network is unreachable. Starting new attempt...
2026-02-22T17:19:30+00:00 INFO  [remote::remote_client] setting state to 'reconnecting'
2026-02-22T17:19:30+00:00 INFO  [remote::remote_client] Trying to reconnect to remote server... Attempt 2
2026-02-22T17:19:30+00:00 ERROR [remote::remote_client] Reconnect attempt 2 failed: failed to connect: ssh: connect to host 192.168.5.135 port 22: Network is unreachable. Starting new attempt...
2026-02-22T17:19:30+00:00 INFO  [remote::remote_client] setting state to 'reconnecting'
2026-02-22T17:19:30+00:00 INFO  [remote::remote_client] Trying to reconnect to remote server... Attempt 3
2026-02-22T17:19:30+00:00 ERROR [remote::remote_client] Reconnect attempt 3 failed: failed to connect: ssh: connect to host 192.168.5.135 port 22: Network is unreachable. Starting new attempt...
2026-02-22T17:19:30+00:00 ERROR [remote::remote_client] Failed to reconnect to after 3 attempts, giving up
2026-02-22T17:19:30+00:00 INFO  [remote::remote_client] setting state to 'reconnect exhausted'
2026-02-22T17:20:15+00:00 INFO  [recent_projects::remote_connections] existing remote workspace found but connection is dead, starting fresh connection
2026-02-22T17:20:16+00:00 INFO  [remote::transport::ssh] Remote is windows: false
2026-02-22T17:20:17+00:00 INFO  [remote::transport::ssh] Remote shell discovered: /usr/bin/fish
2026-02-22T17:20:17+00:00 INFO  [remote::transport::ssh] Remote platform discovered: RemotePlatform { os: Linux, arch: X86_64 }

@zelenenka zelenenka requested a review from Veykril February 23, 2026 09:11
Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Veykril Veykril changed the title Fix remote reconnect when server is not running recent_projects: Fix remote reconnect when server is not running Feb 23, 2026
@Veykril Veykril merged commit 4325520 into zed-industries:main Feb 23, 2026
37 checks passed
@Veykril
Copy link
Member

Veykril commented Feb 23, 2026

/cherry-pick preview
/cherry-pick stable

github-actions bot pushed a commit that referenced this pull request Feb 23, 2026
)

Closes #49363

When an existing remote workspace's connection is dead (e.g. the server
died and reconnect failed, leaving the client in `ServerNotRunning`
state), `remote_connection()` returns `None`. Previously this caused an
error dialog, blocking reconnection — the user had to manually switch to
another project and back to recover.

Now the code falls through to establish a fresh connection instead,
matching the previous behavior where clicking "Reconnect" would just
work.

Release Notes:

- Fixed remote reconnect failing with an error when the server is not
running, now establishes a fresh connection instead.
@zed-zippy
Copy link
Contributor

zed-zippy bot commented Feb 23, 2026

🍒💥 Cherry-pick did not succeed
https://github.com/zed-industries/zed/actions/runs/22304556699

Veykril pushed a commit that referenced this pull request Feb 25, 2026
)

Closes #49363

When an existing remote workspace's connection is dead (e.g. the server
died and reconnect failed, leaving the client in `ServerNotRunning`
state), `remote_connection()` returns `None`. Previously this caused an
error dialog, blocking reconnection — the user had to manually switch to
another project and back to recover.

Now the code falls through to establish a fresh connection instead,
matching the previous behavior where clicking "Reconnect" would just
work.

Release Notes:

- Fixed remote reconnect failing with an error when the server is not
running, now establishes a fresh connection instead.
Veykril pushed a commit that referenced this pull request Feb 25, 2026
) (cherry-pick to preview) (#49871)

Cherry-pick of #49834 to preview

----
Closes #49363

When an existing remote workspace's connection is dead (e.g. the server
died and reconnect failed, leaving the client in `ServerNotRunning`
state), `remote_connection()` returns `None`. Previously this caused an
error dialog, blocking reconnection — the user had to manually switch to
another project and back to recover.

Now the code falls through to establish a fresh connection instead,
matching the previous behavior where clicking "Reconnect" would just
work.

Release Notes:

- Fixed remote reconnect failing with an error when the server is not
running, now establishes a fresh connection instead.

Co-authored-by: Filipe Azevedo <filipe@azevedo.io>
Anthony-Eid pushed a commit to bobbymannino/zed that referenced this pull request Feb 25, 2026
…-industries#49834)

Closes zed-industries#49363

When an existing remote workspace's connection is dead (e.g. the server
died and reconnect failed, leaving the client in `ServerNotRunning`
state), `remote_connection()` returns `None`. Previously this caused an
error dialog, blocking reconnection — the user had to manually switch to
another project and back to recover.

Now the code falls through to establish a fresh connection instead,
matching the previous behavior where clicking "Reconnect" would just
work.

Release Notes:

- Fixed remote reconnect failing with an error when the server is not
running, now establishes a fresh connection instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When a remote session is disconnected, and you click reconnect, now you get an error the remote server is missing

2 participants