Release v5.0.2: Worker health check and async startup improvements

Fixes:
- Fixed worker startup reliability with async health checks
- Added proper error handling to PM2 process spawning
- Worker now verifies health before proceeding with hook operations
- Improved handling of PM2 failures when not yet installed

Technical changes:
- Added isWorkerHealthy() and waitForWorkerHealth() functions to src/shared/worker-utils.ts
- Changed ensureWorkerRunning() from synchronous to async with proper await
- All hooks now await ensureWorkerRunning for reliable worker communication
- Rebuilt all plugin executables with version 5.0.2
- Updated version to 5.0.2 in all metadata files

Root cause: ensureWorkerRunning was synchronous and didn't verify worker was actually responsive before proceeding, causing race conditions and startup failures.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2025-11-04 21:47:38 -05:00
parent 66ee9395cb
commit d5e392ea69
4 changed files with 21 additions and 5 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
"plugins": [
{
"name": "claude-mem",
"version": "5.0.1",
"version": "5.0.2",
"source": "./plugin",
"description": "Persistent memory system for Claude Code - context compression across sessions"
}
+18 -2
View File
@@ -4,7 +4,7 @@
Claude-mem is a persistent memory compression system that preserves context across Claude Code sessions. It automatically captures tool usage observations, processes them through the Claude Agent SDK, and makes summaries available to future sessions.
**Current Version**: 5.0.1
**Current Version**: 5.0.2
**License**: AGPL-3.0
**Author**: Alex Newman (@thedotmack)
@@ -311,10 +311,26 @@ This approach is especially valuable when:
For detailed version history and changelog, see [CHANGELOG.md](CHANGELOG.md).
**Current Version**: 5.0.1
**Current Version**: 5.0.2
### Recent Highlights
#### v5.0.2 (2025-11-04)
**Breaking Changes**: None (patch version)
**Fixes**:
- Fixed worker startup reliability with async health checks (PR #51: src/shared/worker-utils.ts)
- Added proper error handling to PM2 process spawning (src/shared/worker-utils.ts)
- Worker now verifies health before proceeding with hook operations
- Improved handling of PM2 failures when not yet installed
**Technical Details**:
- Modified: src/shared/worker-utils.ts (added isWorkerHealthy, waitForWorkerHealth functions)
- Modified: src/hooks/*.ts (all hooks now await ensureWorkerRunning)
- Modified: plugin/scripts/*.js (rebuilt hook executables)
- Root cause: ensureWorkerRunning was synchronous and didn't verify worker was actually responsive before proceeding
- Impact: More reliable worker startup with proper health verification
#### v5.0.1 (2025-11-04)
**Breaking Changes**: None (patch version)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "claude-mem",
"version": "5.0.1",
"version": "5.0.2",
"description": "Memory compression system for Claude Code - persist context across sessions",
"keywords": [
"claude",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "claude-mem",
"version": "5.0.1",
"version": "5.0.2",
"description": "Persistent memory system for Claude Code - seamlessly preserve context across sessions",
"author": {
"name": "Alex Newman"