Skip to content

fix(ssh): quitting or updating the desktop app no longer stops remote servers - #4

Merged
greaber merged 3 commits into
grant/mainfrom
grant/remote-servers
Nov 12, 2026
Merged

greaber merged 3 commits into
grant/mainfrom
grant/remote-servers

Conversation

@greaber

@greaber greaber commented Nov 11, 2026

Copy link
Copy Markdown
Owner

The desktop app stopped every remote server it had launched over SSH when it quit, and after each desktop update the next reconnect killed the running server to start the new version. Both silently ended agent work on remote machines. Remote downloads also failed on slow links after 240 s.

  • Quitting or closing the app only drops the port forward. Servers stop only on explicit actions: removing the environment or its route, switching it off, or Update.
  • After an app update the running server is reused (no download needed) and the version-mismatch UI offers Update, which, after a confirm warning that running turns stop, restarts the server into the app's version and waits for it to come back compatible. This also covers protocol mismatches. It is offered only for servers this app started (managed); others get the manual guidance.
  • The stop script waits up to 60 s for the server to exit before relaunching.
  • Pairing uses the runner of the live server that owns the T3 home, so a newer binary never migrates an older running server's database.
  • Downloads fail only on stalls (curl under 1 KB/s for 60 s; wget 60 s timeout); archive launches have a 2 h deadline; Switch off/Remove cancel an in-flight launch for the same host.
  • Docs: remote-access, internals/remote.

Known limits: an alias adopting another alias's server still downloads before reuse; the client's 15 s setup error can repeat during a long first download; profiles saved before this change learn their server kind on next connect.

Check SHA Result
vp test run src/tunnel.test.ts src/command.test.ts (packages/ssh) b0dac53 26/27; "concurrent launches" times out at 5 s as on base, passes with --testTimeout=60000
vp test run registry, resolver, outdatedHostUpdate, server, threads-atoms (client-runtime) b0dac53 97 pass
vp test run updateEverything.logic, platform (apps/web) b0dac53 25 pass
vp run check:changed b0dac53 pass

Claude Opus 5.5 via Claude Code (T3 Code).

greaber and others added 3 commits November 11, 2026 12:41
… servers

Quitting the desktop app stopped every remote server it had launched over
SSH, and the first reconnect after a desktop update killed the running server
to start the new version. Either way, agent turns running on the remote
machine died without the user asking. Cold archive downloads were also capped
at 240 seconds, so a slow link failed every launch.

Closing a tunnel, including when the app quits, now only drops the port
forward. A remote server is stopped only by an explicit action: removing the
environment or route, switching the environment off, or updating it. A
reconnect with a changed runner reuses the running server as is; the launch
script installs its runner only when it starts a server, and pairing uses the
running server's own runner so a newer binary never migrates the database
under an older server.

Servers this app launched over SSH report no self-update, so the Update action
(version banner, Connections settings, Update everything) now restarts them:
it confirms that running agent turns will stop, stops the server through the
existing disconnect, reconnects (which starts the app's version), and fails
with a clear message if the server that comes back is still the old version
because the app did not start it. Update everything defers these servers when
an app update is pending, since a restart starts the app's current version.

Archive downloads now fail only when they stall (curl under 1 KB/s for 60 s,
wget after 60 s without data) and archive launches have no overall SSH
deadline; ssh keepalives still end a launch whose connection dies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e running version

After an app update, a reconnect downloaded the full new archive before it
could reuse the running server, while holding the target lock; on hosts that
cannot reach the release server it failed outright. With no launch deadline, a
stuck remote command could hold that lock forever, so Switch off and Remove
waited behind it. The stop script gave the server 2 seconds, so an update
restart could reconnect to a server that was still shutting down, and pairing
for an alias that adopted another alias's server used the newer binary
against the running server's database.

An archive launch whose recorded managed server is alive now runs its helpers
from that server's own runner and downloads the new archive only when it
starts a server. Archive launches get a 2-hour deadline again (downloads
still fail only when they stall), and disconnecting cancels a connect queued
or running for the same target. The stop script waits up to 60 seconds for
the server to exit. Pairing picks the runner of whichever live server owns
the T3 home: any alias's launch record for that PID, or its installed runtime
by version, and otherwise a temporary copy of the new runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…his app started it

The Update restart was offered for any SSH environment without a
self-update, including servers this app only adopted, where a restart cannot
change the version. And when an update raised the protocol version, the old
server was refused and the outdated-host update had no restart path, so it
told the user to update manually.

SSH profiles now record whether the connect reached a server this app
started ("managed") or an existing one. The registry shows the kind each
connect saved without replacing the environment's supervisor, and refuses to
restart a server this app did not start. Update only offers the restart for
managed servers; others keep the manual or self-update guidance. The
outdated-host update restarts a managed SSH server after confirmation, then
waits for it to come back on a compatible version. A managed server that
cannot accept this desktop's pairing now says to switch the environment off
and on, which restarts it, since Update needs a working session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 11, 2026
@greaber
greaber merged commit 8d8784c into grant/main Nov 12, 2026
9 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant