Files
claude-mem/src
Alex Newman b7c6649d9e feat: implement self-spawn pattern for background worker execution
Phase 3 of worker lifecycle fix plan:
- Add spawn import from child_process for detached process creation
- Add PID file management (writePidFile, readPidFile, removePidFile)
- Add health check utilities (isPortInUse, waitForHealth, httpShutdown, waitForPortFree)
- Replace entry point with CLI handling (start/stop/restart/status/--daemon)

The worker now spawns itself with --daemon flag for background execution,
returning immediately with hook response while the daemon runs in background.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 18:59:21 -05:00
..