Skip to content

Version Mismatch Causes Infinite Worker Restart Loop #566

Description

@ashwink-tech

Bug Description

Version mismatch causes infinite worker restart loop, preventing observations from being saved. The plugin reports pluginVersion=9.0.0 but the bundled worker binary reports workerVersion=8.5.9. This triggers the auto-restart mechanism on every hook call, which kills the SDK generator before it can complete the Claude API call to generate observations. Result: 0 observations are ever saved to the database despite hooks firing successfully.

Steps to Reproduce
Add marketplace: /plugin marketplace add thedotmack/claude-mem
Install plugin: /plugin install claude-mem
Restart Claude Code
Use any tool (Read, Bash, Grep, etc.)
Check observations: sqlite3 ~/.claude-mem/claude-mem.db "SELECT COUNT(*) FROM observations;" → Returns 0
Check logs: Version mismatch detected on every tool use, followed by worker restart

Expected Behavior
Plugin version and worker version should match
Observations should be saved to the database after tool usage
Worker should not restart on every hook call

Actual Behavior

[SYSTEM] Worker version mismatch detected - auto-restarting {pluginVersion=9.0.0, workerVersion=8.5.9}
This happens on EVERY PostToolUse hook, causing:
Observation enqueued ✅
SDK generator starts ✅
Worker shutdown triggered (version mismatch) ❌
Generator killed before Claude API call completes
0 observations saved
Version Inconsistencies Found
Component Version
Plugin folder name 9.0.0
package.json version 8.5.10
Worker binary version 8.5.9
Plugin version check expects 9.0.0
Environment
Claude-mem version: 9.0.0 (installed) / 8.5.10 (package.json) / 8.5.9 (worker)
Claude Code version: 2.0.76
OS: macOS (Darwin 24.3.0)
Platform: darwin
Node.js: v24.7.0
Bun: 1.3.5
uv: 0.9.21

Logs

[2026-01-06 13:14:16.314] [INFO ] [SYSTEM] Worker version mismatch detected - auto-restarting {pluginVersion=9.0.0, workerVersion=8.5.9}
[2026-01-06 13:14:22.966] [DEBUG] [SYSTEM] Version check {pluginVersion=9.0.0, workerVersion=8.5.9, note=Mismatch will be auto-restarted by worker-service start command}
[2026-01-06 13:14:23.021] [INFO ] [SYSTEM] Worker version mismatch detected - auto-restarting {pluginVersion=9.0.0, workerVersion=8.5.9}
[2026-01-06 13:16:34.061] [INFO ] [SYSTEM] Worker version mismatch detected - auto-restarting {pluginVersion=9.0.0, workerVersion=8.5.9}
Additional Context
Fresh install has this issue immediately
Uninstall + reinstall doesn't fix it (same package downloaded)
Plugin package has inconsistent versioning between folder name (9.0.0), package.json (8.5.10), and bundled worker binary (8.5.9)
Worker health check shows {"status":"ok","build":"TEST-008-wrapper-ipc"} - functional otherwise
All dependencies installed correctly (bun, uv, node)

Metadata

Metadata

Labels

bugConfirmed bug

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions