Skip to content

Fix orphaned tmux processes and add GC for orphaned sessions#139

Merged
andyrewlee merged 4 commits intomainfrom
phantom-server
Feb 1, 2026
Merged

Fix orphaned tmux processes and add GC for orphaned sessions#139
andyrewlee merged 4 commits intomainfrom
phantom-server

Conversation

@andyrewlee
Copy link
Copy Markdown
Owner

@andyrewlee andyrewlee commented Feb 1, 2026

KillSession now kills pane process trees (SIGTERM→SIGKILL) before killing the tmux session, preventing orphaned node/turbo/pnpm processes that survive SIGHUP. A periodic GC pass compares live @amux sessions against known workspace IDs and cleans up sessions for deleted workspaces.


Open with Devin

KillSession now kills pane process trees (SIGTERM→SIGKILL) before
killing the tmux session, preventing orphaned node/turbo/pnpm processes
that survive SIGHUP. A periodic GC pass compares live @amux sessions
against known workspace IDs and cleans up sessions for deleted workspaces.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional flags.

Open in Devin Review

andyrewlee and others added 3 commits February 1, 2026 01:48
…sessions

Without this, a sync tick firing before loadProjects completes would see
an empty workspace set and treat every @amux session as orphaned.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…PIDs

Without -s, list-panes only returns panes from the active window,
leaving processes in other windows alive after kill-session.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Cover PanePIDs (including -s flag multi-window regression), KillSession
process-tree kill, AmuxSessionsByWorkspace grouping/filtering, and
app-layer GC gating and integration with real tmux servers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@andyrewlee andyrewlee merged commit e31a8f7 into main Feb 1, 2026
1 check passed
@andyrewlee andyrewlee deleted the phantom-server branch February 1, 2026 17:44
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