GeezerVison is showing github.com — fix(ssh): reconnecting no longer restarts the remote server by f4llenz · Pull Request #13521 · pingdotgg/t3code
Conversation
f4llenz
commented
Sep 24, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Every time the desktop reconnected to an SSH host, it stopped the T3 server it had launched there and started a new one, ending every agent session that server was running. On one host the server restarted on nearly every reconnect, 10 times in one day. It is one of the triggers in #5749.
The launcher reads ~/.t3/userdata/server-runtime.json to find a server that took over the host, such as the background service. Its own server writes to that same file, so on the next connect the launcher took it for another server, stopped it, and then launched a replacement. Now it hands off only when the file names a different process. This does not stop two servers from sharing one home; that is the lock work in #8442 and #9652.
A new test runs the real launch script twice against a stand-in server: the second launch keeps the same server. It also checks that a genuinely different server is still adopted. Without the fix, the test fails because the second launch returns a new process.
Made with Claude Opus 5.5 in Claude Code.
Summary by CodeRabbit
- Bug Fixes
- Fixed remote SSH launches to correctly reuse an existing server and recognize servers running in the default location.
- Prevented a running server from being interrupted when its runtime information refers to that same server.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
fullheart reacted with heart emoji
…e.json
The SSH launcher reads the default home's server-runtime.json to adopt a
server that took over, such as the background service. The launcher's own
managed server runs against that same home, so it records itself there too.
The launcher then treated it as a foreign server: it stopped the managed
PID, marked the port external, found it dead, and started a new server.
Every reconnect therefore restarted a healthy managed server and ended the
provider sessions it owned. Hand off only when the runtime file names a
different process.
Approvability
Verdict: Approved at e61a017
Macroscope's review found this PR approvable — This is a small, well-scoped SSH bug fix that prevents a managed server from stopping itself while preserving handoff to a different server. An isolated regression test covers both reuse and external-server scenarios, with no schema, deployment, default, or static-analysis changes.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
f4llenz
changed the title
fix(ssh): keep the managed server when it is the one in server-runtime.json
fix(ssh): reconnecting no longer restarts the remote server
Sep 24, 2026
A reaped-late zombie still answers kill -0, so a PID check can report a
stopped server as running on some Linux hosts. A refused connection is the
behavior that matters.
coderabbitai
Bot
commented
Sep 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
Important
Review skipped
Review was skipped as selected files did not have any reviewable changes.
⚙️ Run configuration
Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID: 06a8ec28-b1aa-4407-bb08-ef5ab497a1c0
📥 Commits
Reviewing files that changed from the base of the PR and between fe616c7 and 336e338.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID: 939edba0-038f-4ccb-a557-7faa5a95d7aa
📥 Commits
Reviewing files that changed from the base of the PR and between d4a3345 and b8f8482.
📒 Files selected for processing (2)
packages/ssh/src/runnerProcess.test.ts
packages/ssh/src/tunnel.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough
The remote launch script now skips default-runtime handoff when that runtime belongs to the current SSH-managed server. A Unix-only integration test checks repeated launches, adoption of a different default-home server, and cleanup.
Changes
SSH runtime launch
| Layer / File(s) |
Summary |
Runtime reuse and handoff packages/ssh/src/tunnel.ts, packages/ssh/src/runnerProcess.test.ts |
The launch script excludes the current SSH-managed PID from the default-runtime handoff condition. The integration test checks managed-server reuse and adoption of another server. It also captures launched processes for cleanup. |
Priority: ➖ Normal
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge
Merge Risk: ⚪ Minimal · up to b8f84
The change appears ready to merge after normal checks; no actionable issue is established by the supplied evidence.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name |
Status |
Explanation |
| Docstring Coverage |
✅ Passed |
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2… |
| Linked Issues check |
✅ Passed |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
✅ Passed |
Check skipped because no linked issues were found for this pull request. |
| Title check |
✅ Passed |
The title clearly and concisely describes the main change: preventing SSH reconnects from restarting the managed remote server. |
| Description check |
✅ Passed |
The description explains the problem, the fix, the scope, and the test coverage. It omits the template headings and checklist, but it provides the required substantive information and is focused. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 6, 2026
|
I hit exactly this today: two reconnects, two server restarts, two long agent runs cut off. I'd love to see this merged.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note Grok responding on behalf of Julius.
Closing as superseded by #19432, which just merged. It includes this fix: the launcher now reuses its own managed server when server-runtime.json names the PID it recorded, so reconnect no longer stops and replaces it. Thanks for tracking this down!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
macroscope-review
Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews
size:XS
0-9 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|