When gt done runs inside a tmux session (e.g., after polecat task completion), calling KillSessionWithProcesses would kill the gt done process itself before it could complete cleanup operations like writing handoff state. Add KillSessionWithProcessesExcluding() function that accepts a list of PIDs to exclude from the kill sequence. Update selfKillSession to pass its own PID, ensuring gt done completes before the session is destroyed. Also fix both Kill*WithProcesses functions to ignore "session not found" errors from KillSession - when we kill all processes in a session, tmux may automatically destroy it before we explicitly call KillSession. Co-authored-by: julianknutsen <julianknutsen@users.noreply.github> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
44 KiB
44 KiB