Conversation
…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.
ApprovabilityVerdict: Approved at 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. |
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.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe 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. ChangesSSH runtime launch
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to 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)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.jsonto 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