Compare commits

..

3 Commits

Author SHA1 Message Date
Alex Newman cf1c966409 chore: Bump version to 6.0.5
Automatic cleanup of orphaned MCP server processes on worker startup
Removed manual cleanup notice from session context
Self-healing maintenance on every worker restart

Generated with Claude Code
2025-11-16 22:39:06 -05:00
Alex Newman 02fef487e7 feat: add cleanup for orphaned MCP server processes on startup
- Implemented a new method `cleanupOrphanedProcesses` to identify and terminate orphaned `uvx` processes from previous sessions.
- Integrated the cleanup method into the `start` process of the WorkerService to ensure a clean environment at startup.
- Added logging for process cleanup actions and handled potential errors gracefully without failing the service startup.
2025-11-16 22:36:39 -05:00
Alex Newman 20d45006c0 docs: Update CHANGELOG.md for v6.0.4
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 22:21:53 -05:00
7 changed files with 87 additions and 26 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
"plugins": [
{
"name": "claude-mem",
"version": "6.0.4",
"version": "6.0.5",
"source": "./plugin",
"description": "Persistent memory system for Claude Code - context compression across sessions"
}
+25
View File
@@ -4,6 +4,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [6.0.4] - 2025-11-17
**Patch Release**
Fixes memory leaks from orphaned uvx/python processes that could accumulate during ChromaDB operations.
**Changes:**
- Fixed process cleanup in ChromaDB sync operations to prevent orphaned processes
- Improved resource management for external process spawning
**Full Changelog:** https://github.com/thedotmack/claude-mem/compare/v6.0.3...v6.0.4
## [6.0.3] - 2025-11-16
## What's Changed
Documentation alignment release - merged PR #116 fixing hybrid search architecture documentation.
### Documentation Updates
- Added comprehensive guide
- Updated technical architecture documentation to reflect hybrid ChromaDB + SQLite + timeline context flow
- Fixed skill operation guides to accurately describe semantic search capabilities
**Full Changelog**: https://github.com/thedotmack/claude-mem/compare/v6.0.2...v6.0.3
## [6.0.2] - 2025-11-14
## Changes
+1 -1
View File
@@ -6,7 +6,7 @@ Claude-mem is a Claude Code plugin providing persistent memory across sessions.
**Your Role**: You are working on the plugin itself. When users interact with Claude Code with this plugin installed, your observations get captured and become their persistent memory.
**Current Version**: 6.0.4
**Current Version**: 6.0.5
## IMPORTANT: Skills Are Auto-Invoked
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "claude-mem",
"version": "6.0.4",
"version": "6.0.5",
"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": "6.0.4",
"version": "6.0.5",
"description": "Persistent memory system for Claude Code - seamlessly preserve context across sessions",
"author": {
"name": "Alex Newman"
File diff suppressed because one or more lines are too long
+35
View File
@@ -180,10 +180,45 @@ export class WorkerService {
this.app.get('/api/search/help', this.handleSearchHelp.bind(this));
}
/**
* Cleanup orphaned MCP server processes (uvx/chroma) from previous sessions
*/
private async cleanupOrphanedProcesses(): Promise<void> {
try {
const { execSync } = await import('child_process');
// Find orphaned uvx processes (which spawn chroma servers)
try {
const processes = execSync('pgrep -fl uvx', { encoding: 'utf-8', stdio: 'pipe' }).trim();
if (processes) {
const processCount = processes.split('\n').length;
logger.info('WORKER', 'Cleaning up orphaned MCP processes', { count: processCount });
// Kill the processes
execSync('pkill -f uvx', { stdio: 'pipe' });
logger.success('WORKER', `Cleaned up ${processCount} orphaned MCP server processes`);
}
} catch (error: any) {
// pgrep returns exit code 1 if no processes found (not an error)
if (error.status === 1) {
logger.debug('WORKER', 'No orphaned MCP processes to clean up');
} else {
throw error;
}
}
} catch (error) {
// Don't fail startup if cleanup fails
logger.warn('WORKER', 'Failed to cleanup orphaned processes (non-fatal)', {}, error as Error);
}
}
/**
* Start the worker service
*/
async start(): Promise<void> {
// Cleanup orphaned processes from previous sessions
await this.cleanupOrphanedProcesses();
// Initialize database (once, stays open)
await this.dbManager.initialize();