Environment: Ubuntu 24.04.3 LTS, Claude Code VS Code extension, Bun runtime, Node v22
I think the original install fail may have been because I left all 3 IDEs checked for installation. The npx install wasn't clear that it was a checklist, so I just made sure "Claude Code" was highlighted and pressed enter... which installed all 3.
- Install via plugin marketplace: Claude-mem dashboard stuck on "loading more" with 503 on /stream
- Install via npx (overwriting): also resulted in dashboard "loading more" with 503
- Researched the claude-mem docs, GitHub issues, and troubleshooting page for known fixes
- Relevant GitHub issues found:
- thedotmack/claude-mem#717 (Unable to connect to claude-mem service, stale PID file)
- thedotmack/claude-mem#1054 (Failed to spawn worker daemon)
- thedotmack/claude-mem#843 (known resolution tracked separately)
- Troubleshooting docs at https://docs.claude-mem.ai/troubleshooting
Examined /home/username/.claude-mem/logs/claude-mem-2026-04-22.log. Key errors:
[ERROR] [SYSTEM] Background initialization failed no such table: observations
[ERROR] [SYSTEM] Fatal error Invalid argument
[ERROR] [WORKER] Request to GET /projects rejected — DB not initialized Database initialization timeout
[ERROR] [WORKER] Request to GET /settings rejected — DB not initialized Database initialization timeout
[ERROR] [WORKER] Request to GET /observations rejected — DB not initialized Database initialization timeout
[WARN ] [HOOK ] session-init: worker request failed: Request timed out after 3000ms
The SQLite database (~/.claude-mem/claude-mem.db) existed but its tables were never created. The observations table was missing, causing every request to fail with "Database initialization timeout". The worker would start but could never serve data, resulting in the 503 on /stream.
Attempted manual restart per the troubleshooting docs:
cd ~/.claude/plugins/cache/thedotmack/claude-mem/9.0.4 && bun scripts/worker-service.cjs startResult: process immediately returned "Killed" (SIGKILL). Readiness check returned nothing. Initially suspected OOM, but dmesg showed no OOM kills. The real issue was the corrupted/incomplete DB preventing initialization.
Since I had just installed it, reinstall was probably the best course. I was uninterested in keeping data/config. Uninstall took A WHILE. Multiple files in multiple places was a small surprise. The remaining and automatically restarting daemons likely caused initial reinstall failures.
pkill -f "worker-service.cjs"
npm uninstall -g claude-mem
npx clear-npx-cache
rm -rf ~/.claude-memResult: npx claude-mem@latest install still prompted to overwrite existing installation. Files remained elsewhere.
Found claude-mem@thedotmack in enabledPlugins and thedotmack marketplace entry in ~/.claude/settings.json. Removed both manually.
After deleting ~/.claude-mem, it kept reappearing within seconds. The active Claude Code session's SessionStart hook (defined in ~/.claude/plugins/cache/thedotmack/claude-mem/12.3.8/hooks/hooks.json) was recreating the directory on every prompt submit. The hook runs smart-install.js and then starts worker-service.cjs --daemon, which recreates the data directory.
Restarting the VS Code window did not help because the session hooks were still loaded.
Running ps aux | grep claude-mem revealed detached background processes that survived IDE restarts:
/home/username/.bun/bin/bun /home/username/.claude/plugins/cache/thedotmack/claude-mem/12.3.8/scripts/worker-service.cjs --daemon
/home/username/.bun/bin/bun /home/username/.claude/plugins/cache/thedotmack/claude-mem/12.3.8/scripts/mcp-server.cjs
/home/username/.local/bin/uv tool uvx --python 3.13 chroma-mcp --client-type persistent --data-dir /home/username/.claude-mem/chroma
These were forked as detached daemons, not tied to the Claude Code session, so they survived every restart.
Killed all processes, then removed every directory containing claude-mem artifacts:
Processes to kill:
- worker-service.cjs (bun, detached --daemon)
- mcp-server.cjs (bun)
- chroma-mcp (Python subprocess via uv/uvx)
Directories to delete:
~/.claude-mem/(data, DB, logs, worker PID, settings, supervisor config)~/.claude/plugins/cache/thedotmack/(plugin cache with worker scripts)~/.claude/plugins/marketplaces/thedotmack/(full git repo clone, source of the daemon scripts)~/.claude/plugins/data/claude-mem-thedotmack/(plugin data)~/.npm/_npx/*/node_modules/claude-mem(npx cache)~/.cache/claude-cli-nodejs/.../mcp-logs-plugin-claude-mem-*(MCP log cache)~/.claude/projects/-home-username--claude-mem-observer-sessions(project memory)~/.config/opencode/plugins/claude-mem.js(opencode plugin)
Settings to clean:
~/.claude/settings.json: removeclaude-mem@thedotmackfromenabledPluginsandthedotmackfromextraKnownMarketplaces
After killing processes and removing all directories, a broad find across ~ confirmed zero remaining traces.
Once all remaining traces were removed (many files across 6 different directories), npx claude-mem@latest install ran without asking to overwrite. Taking care to check only the Claude Code IDE option, the install completed as expected.
npx claude-mem@latest install- DB initialized properly: logs showed
Creating FTS5 tables,FTS5 tables created successfully,Database initialized - Worker healthy: logs confirmed
Worker is now healthy,MCP loopback self-check connected - Port mismatch: post-install message printed
http://localhost:37777but the actual worker started on port 37700. The install script hardcodes 37777 in its output, but~/.claude-mem/settings.jsonconfiguresCLAUDE_MEM_WORKER_PORT: "37700". The port is calculated as37700 + (uid % 100). - Dashboard loaded:
http://localhost:37700showed "no items to display", confirming a working but empty database - SessionStart hook errors on first launch: two non-blocking errors ("Failed with non-blocking status code: No stderr output") from the
smart-install.jshook. These were cosmetic and resolved after bouncing the Claude Code session.
The plugin registers 3 SessionStart hooks (in hooks/hooks.json):
smart-install.js: dependency/install check (source of the non-blocking errors)worker-service.cjs start+ health poll loop: starts the daemon, waits up to 20s for /health- Context injection: waits for worker health, then calls
worker-service.cjs hook claude-code context
- The npx installer IDE checklist is unclear: it looks like a selection list but is actually a multi-select checklist. Pressing enter without unchecking installs for all IDEs.
- There is no uninstall command: no
npx claude-mem uninstallor/plugin uninstallpath exists for npx installs. Manual cleanup required. - Daemon processes are detached:
worker-service.cjs --daemonforks and survives IDE restarts. Must be killed manually viapkill -f worker-service.cjs. - Session hooks recreate deleted files: active Claude Code sessions will recreate
~/.claude-mem/on every prompt submit until the session is fully terminated. - Artifacts spread across 6+ directories: a single install touches
~/.claude-mem,~/.claude/plugins/cache,~/.claude/plugins/marketplaces,~/.claude/plugins/data,~/.npm/_npx, and~/.cache/claude-cli-nodejs. - Post-install URL is wrong: the displayed port doesn't match the configured port.