Roland Tritsch
1b036aadf5
Fix deacon patrol process leak by killing pane processes before respawn ( #745 )
...
## Problem
The deacon patrol was leaking claude processes. Every patrol cycle (1-3 minutes),
a new claude process was spawned under the hq-deacon tmux session, but old processes
were never terminated. This resulted in 12+ accumulated claude processes consuming
resources.
## Root Cause
In molecule_step.go:331, handleStepContinue() used tmux respawn-pane -k to restart
the pane between patrol steps. The -k flag sends SIGHUP to the shell but does not
kill all descendant processes (claude and its node children).
## Solution
Added KillPaneProcesses() function in tmux.go that explicitly kills all descendant
processes before respawning the pane. This function:
- Gets all descendant PIDs recursively
- Sends SIGTERM to all (deepest first)
- Waits 100ms for graceful shutdown
- Sends SIGKILL to survivors
Updated handleStepContinue() to call KillPaneProcesses() before RespawnPane().
Co-authored-by: Roland Tritsch <roland@ailtir.com >
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-01-20 22:30:23 -08:00
..
2026-01-20 14:17:35 -08:00
2026-01-20 20:48:33 -08:00
2026-01-11 23:03:47 -08:00
2026-01-12 01:45:26 -08:00
2026-01-13 13:40:57 -08:00
2026-01-13 13:14:47 -08:00
2026-01-20 20:45:58 -08:00
2026-01-17 03:19:08 -08:00
2026-01-15 17:44:40 -08:00
2026-01-16 15:28:55 -08:00
2026-01-13 19:34:29 -08:00
2026-01-13 19:34:29 -08:00
2026-01-13 19:34:29 -08:00
2026-01-20 21:36:42 -08:00
2026-01-20 20:46:43 -08:00
2026-01-17 02:49:17 -08:00
2026-01-20 12:58:01 -08:00
2026-01-13 22:13:57 -08:00
2026-01-16 15:27:59 -08:00
2026-01-17 03:49:18 -08:00
2026-01-20 20:45:58 -08:00
2026-01-12 23:07:49 -08:00
2026-01-17 02:55:39 -08:00
2026-01-20 20:45:58 -08:00
2026-01-20 20:20:49 -08:00
2026-01-17 02:55:39 -08:00
2026-01-20 19:51:37 -08:00
2026-01-20 19:51:37 -08:00
2026-01-10 22:56:33 -08:00
2026-01-17 01:34:38 -08:00
2026-01-16 11:05:59 -08:00
2026-01-16 11:05:59 -08:00
2026-01-12 02:45:03 -08:00
2026-01-12 02:31:06 -08:00
2026-01-16 12:33:51 -08:00
2026-01-20 14:15:31 -08:00
2026-01-20 14:17:52 -08:00
2026-01-09 22:46:06 -08:00
2026-01-16 15:28:55 -08:00
2026-01-17 12:46:49 -08:00
2026-01-20 14:17:35 -08:00
2026-01-20 12:58:01 -08:00
2026-01-09 23:01:55 -08:00
2026-01-17 09:49:53 -08:00
2026-01-09 23:01:55 -08:00
2026-01-14 21:18:20 -08:00
2026-01-14 21:18:20 -08:00
2026-01-09 23:01:55 -08:00
2026-01-20 20:48:47 -08:00
2026-01-14 21:29:37 -08:00
2026-01-09 23:01:55 -08:00
2026-01-14 21:19:54 -08:00
2026-01-14 21:25:11 -08:00
2026-01-09 23:01:55 -08:00
2026-01-20 20:48:47 -08:00
2026-01-17 02:55:39 -08:00
2026-01-20 14:10:26 -08:00
2026-01-17 02:11:12 -08:00
2026-01-09 22:10:09 -08:00
2026-01-20 22:30:23 -08:00
2026-01-20 19:31:26 -08:00
2026-01-16 15:23:28 -08:00
2026-01-16 15:27:38 -08:00
2026-01-20 19:31:26 -08:00
2026-01-17 01:40:02 -08:00
2026-01-17 02:55:39 -08:00
2026-01-20 20:43:31 -08:00
2026-01-20 19:31:17 -08:00
2026-01-17 03:47:18 -08:00
2026-01-17 03:41:18 -08:00
2026-01-12 16:42:33 -08:00
2026-01-16 12:33:51 -08:00
2026-01-16 12:33:51 -08:00
2026-01-13 13:37:00 -08:00
2026-01-17 02:55:39 -08:00
2026-01-11 18:37:01 -08:00
2026-01-12 23:07:49 -08:00
2026-01-10 18:28:14 -08:00
2026-01-10 18:28:14 -08:00
2026-01-17 09:46:25 -08:00
2026-01-12 23:07:49 -08:00
2026-01-13 20:59:15 -08:00
2026-01-13 20:59:15 -08:00
2026-01-16 15:38:08 -08:00
2026-01-20 20:20:49 -08:00
2026-01-13 13:14:47 -08:00
2026-01-20 20:00:56 -08:00
2026-01-16 15:27:38 -08:00
2026-01-16 15:23:35 -08:00
2026-01-12 17:44:37 -08:00
2026-01-20 20:19:05 -08:00
2026-01-09 21:52:09 -08:00
2026-01-20 12:57:46 -08:00
2026-01-11 18:06:09 -08:00
2026-01-12 01:45:26 -08:00
2026-01-15 19:19:13 -08:00
2026-01-13 14:01:49 +01:00
2026-01-17 00:37:38 -08:00
2026-01-12 03:11:59 -08:00
2026-01-20 14:17:35 -08:00
2026-01-20 14:17:35 -08:00
2026-01-12 03:11:59 -08:00
2026-01-20 14:17:35 -08:00
2026-01-20 20:02:44 -08:00
2026-01-12 03:10:58 -08:00
2026-01-20 20:25:25 -08:00
2026-01-17 00:00:50 -08:00
2026-01-17 12:46:49 -08:00
2026-01-13 13:37:00 -08:00
2026-01-20 14:17:35 -08:00
2026-01-19 11:21:54 -08:00
2026-01-19 11:21:54 -08:00
2026-01-20 14:17:35 -08:00
2026-01-09 22:46:06 -08:00
2026-01-13 19:34:29 -08:00
2026-01-11 22:23:21 -08:00
2026-01-13 13:46:50 -08:00
2026-01-17 00:50:46 -08:00
2026-01-17 12:46:49 -08:00
2026-01-09 21:56:53 -08:00
2026-01-20 20:45:58 -08:00