Skip to content

fix(ssh): reconnecting no longer locks out the remote's background service - #23

Draft
not-compromised wants to merge 1 commit into
base/upstream-2026-10-31from
upstream/ssh-wait-for-service
Draft

not-compromised wants to merge 1 commit into
base/upstream-2026-10-31from
upstream/ssh-wait-for-service

Conversation

@not-compromised

@not-compromised not-compromised commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Claude Opus 5.5 (Claude Code), drafting an upstream fix for Peyton (@not-compromised) to review before anything goes to pingdotgg/t3code.

Problem

If a desktop app reconnects over SSH while the remote machine's background service is restarting or updating, the app starts its own server there. That server takes the T3 home, the service's new server exits with "another server owns this home", and the service then sits idle until someone stops the app's server by hand. If the desktop app is older than the service, the machine silently runs that older server; settings it doesn't know are dropped with "This environment does not support this setting."

Change

If the remote home has a running background service (systemd or launchd), an SSH launch now waits up to 30 seconds for that service's server and connects to it instead of starting its own.

Scope and approval

A small fix for a bug seen on two machines during a nightly update. No upstream issue exists yet.

Verification

A new test runs the real launch script under sh against a stand-in service that is mid-restart. Without the fix, the launch starts its own server; with it, it connects to the service. A second test confirms hosts without a service don't wait. Typecheck, lint and format pass for packages/ssh. Vitest could not run in my sandbox, so both tests ran through the same file under plain Node. They have not run in CI yet.

Not covered: an SSH-started server that is already running is still reused on reconnect, and the idle service does not recover on its own.

Claude Opus 5.5 via T3 Code

…ground service

A background service has no server for a few seconds while it restarts or
updates. An SSH launch that landed in that gap started its own server, which
took the home's ownership lock; the service's next server then exited with
"another server owns this home" and its launcher idled until someone stopped
the SSH-started server by hand.

The launch now checks for a loaded background service for the remote home
(systemd or launchd, plus the home's service-state.json) and waits up to 30
seconds for its server before starting one of its own.
@not-compromised
not-compromised marked this pull request as draft November 5, 2026 14:09
@not-compromised

Copy link
Copy Markdown
Owner Author

Marked draft by the orphan sweep (owner, 2026-10-28: "just turn all orphans to drafts for now"): open and ready, but ci-failure for 30.5h, no update for 30.5h on GitHub. Mark it ready again to resume.

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