kill secondary Claude tmux sessions on tab close (T-87)

Adds lib/builtin/claude/src/tmux_session.dart with helpers for the
clide-socket tmux server: killSession, listClideSessions,
reapSecondaries, killAllForRepo. The runner is overrideable via a
TmuxRunner typedef so tests don't shell out for real.

Wires ClaudePane.dispose() to call killSession(sessionName) for
secondary panes. Primary panes are left alone — D-41 keeps the
primary's tmux session alive across clide restarts so the next
launch re-attaches via `tmux new-session -A`.

Imports the helpers in the Claude extension as groundwork for the
app-shutdown reap and the existing claude.kill-all-sessions
command — wiring those uses lands separately.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-05-06 16:41:33 +02:00
co-authored by Claude
parent 6e6546fe32
commit 1c424f26e7
5 changed files with 78 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{
"exported_at": "2026-05-06T14:40:38Z",
"exported_at": "2026-05-06T14:41:33Z",
"decisions": [
{
"id": "D-1",