mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-30 16:39:33 +01:00
killSession() read `#{pane_pid}` and fell back to the recorded pid when
tmux printed none, which tmux 3.8 does for every dead pane. That pid
belongs to the program that exited; the OS may have reused it, and the
kill path walked its process tree and SIGKILLed it. It now reads
`#{pane_dead}` with the pid (parsePaneKillRead) and, for a dead pane,
only runs kill-session. Survivors of an exited program were already out
of reach (reparented, and the group kill only ran for a live leader),
so nothing a live pane gets is lost. Strategies 1 and 2 move into
killPaneProcessTree() unchanged.
Docs: the architecture-invariants paragraph says a kept dead pane is
respawned by the restore at the next server start (measured on tmux
3.8; tmux 3.7 and older always did this), and describes the kill rule.
CLAUDE.md's paneExit rule gains the no-pid warning. The
PaneExitObservation comment no longer claims tmux before 3.4 lacks
`#{pane_dead_time}`, which was never measured.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
678 B
678 B
aicodeman
| aicodeman |
|---|
| patch |
On tmux 3.8, a session whose agent exited (/exit) is now seen as exited and closed like on older tmux, instead of staying on the board as idle. tmux 3.8 prints a blank pane pid for a dead pane, and the pane watcher threw that row away, so the clean-exit sweep never ran and a restart of Codeman dropped the session's record while its tmux session stayed on the socket. A dead pane's exit is now told apart from the next one by #{pane_dead_time}. Closing a session whose pane is dead no longer signals the pid recorded for it, which belonged to the program that exited and may have been reused by another process; only the tmux session is killed.