cdb0e823aa
Add killIdleDaemonChildren() to clean up SDK-spawned claude processes that don't terminate after completing their work. Problem: - Worker-service daemon spawns Claude SDK processes - These processes remain alive after work completes - They accumulate over time, consuming significant memory - Existing killSystemOrphans() only handles PPID=1 orphans Solution: - Add killIdleDaemonChildren() that finds claude processes where: - Parent PID = daemon's PID (children of worker-service) - CPU = 0% (idle, not actively working) - Running > 2 minutes (completed their work) - Call it from reapOrphanedProcesses() (runs every 5 minutes) Testing: - Verified locally: 15+ zombie processes cleaned up - Memory saved: ~2GB - Normal processes (MCP server, Chroma) unaffected Co-Authored-By: Claude <noreply@anthropic.com>