fix: prevent zombie process accumulation by verifying subprocess exit (#1168) (#1175)

Two changes fix the observer process resource leak:

1. Add ensureProcessExit to generator finally blocks in SessionRoutes and
   worker-service, matching the pattern already working in SDKAgent.

2. Add stale session reaper (every 2m) that removes sessions with no active
   generator and no pending work after 15m idle. This unblocks the orphan
   reaper which previously skipped processes for "active" sessions.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-02-18 16:33:23 -05:00
committed by GitHub
parent 2180d31ee6
commit 5d79bb7a7a
5 changed files with 172 additions and 105 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/setup.sh",
"timeout": 120
"timeout": 300
}
]
}