GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(ssh): reconnecting no longer restarts the remote server by f4llenz · Pull Request #13521 · pingdotgg/t3code

Conversation

@f4llenz

@f4llenz f4llenz commented Sep 24, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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
All reactions
  • ❤️ 1 reaction
@f4llenz
fix(ssh): keep the managed server when it is the one in server-runtim…
e61a017
…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.
@f4llenz f4llenz mentioned this pull request Sep 24, 2026
fix(server): refuse to start a second server against a live data directory #8442
Closed
4 tasks done
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 24, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Sep 24, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@f4llenz 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
f4llenz and others added 2 commits September 24, 2026 19:59
@f4llenz
test(ssh): check the stopped server by its port, not its PID
5bfeafc
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.
@f4llenz
Merge branch 'main' into fix/ssh-reuse-own-managed-server
b8f8482
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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:

  • 🔍 Trigger review

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)
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Rasalas Rasalas mentioned this pull request Sep 26, 2026
SSH reconnect can replace an external T3 service with a competing managed runtime #5749
Closed
@f4llenz
Merge branch 'main' into fix/ssh-reuse-own-managed-server
fe616c7
@Blackskyliner Blackskyliner mentioned this pull request Sep 30, 2026
Multiple servers share one --base-dir and each resumes the others' live threads #14115
Closed
@f4llenz
Merge branch 'main' into fix/ssh-reuse-own-managed-server
336e338
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 1, 2026 — with ChatGPT Codex Connector
This was referenced Oct 6, 2026
[Bug]: SSH reconnect kills a busy remote server, cancelling all running agents (2s reuse probe) #16477
Closed
[Bug]: SSH environment stays reconnecting after desktop update reuses an older remote server #16984
Closed
@sliva0 sliva0 mentioned this pull request Oct 8, 2026
SSH launcher ignores a custom T3CODE_HOME and starts a second environment instead of reusing the service #17039
Open
@Trillx Trillx mentioned this pull request Oct 11, 2026
SSH remote: client kills its own managed server on every reconnect (default-runtime adoption check) #15986
Closed
@fullheart

fullheart commented Oct 13, 2026

Copy link
Copy Markdown

I hit exactly this today: two reconnects, two server restarts, two long agent runs cut off. I'd love to see this merged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg t3dotgg mentioned this pull request Oct 14, 2026
fix(ssh): reconnecting keeps the remote server and its agents running #19432
Merged
@juliusmarminge

juliusmarminge commented Oct 14, 2026

Copy link
Copy Markdown
Member

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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

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.

Projects

None yet

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.

3 participants

@f4llenz @fullheart @juliusmarminge
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.