Documentation Index
Fetch the complete documentation index at: https://docs.claude-mem.ai/llms.txt
Use this file to discover all available pages before exploring further.
Troubleshooting Guide
Quick Diagnostic Tool
Describe any issues you’re experiencing to Claude, and the troubleshoot skill will automatically activate to provide diagnosis and fixes. The troubleshoot skill will:- ✅ Check worker status and health
- ✅ Verify database existence and integrity
- ✅ Test worker service connectivity
- ✅ Validate dependencies installation
- ✅ Check port configuration and availability
- ✅ Provide automated fixes for common issues
Common Issues
Viewer UI Not Loading
Symptoms: Cannot reach the viewer URL, page doesn’t load, or browser shows a connection error. Solutions:-
Find the worker port. The default is
37700 + (uid % 100). The configured port is the value ofCLAUDE_MEM_WORKER_PORTin~/.claude-mem/settings.json; the running worker also reports it on/api/health: -
Verify worker is healthy:
-
Check worker logs for errors:
-
Restart worker service:
-
Pin a fixed port if the auto-assigned one collides:
Theme Toggle Not Persisting
Symptoms: Theme preference (light/dark mode) resets after browser refresh. Solutions:-
Check browser localStorage is enabled:
-
Verify settings endpoint is working:
-
Clear localStorage and try again:
- Check for browser privacy mode (blocks localStorage)
SSE Connection Issues
Symptoms: Viewer shows “Disconnected” status, updates not appearing in real-time. Solutions:-
Check SSE endpoint is accessible:
-
Check browser console for errors:
- Open DevTools (F12)
- Look for EventSource errors
- Check Network tab for failed /stream requests
-
Verify worker is running:
-
Check for network/proxy issues blocking SSE
- Corporate firewalls may block SSE
- Try disabling VPN temporarily
-
Restart worker and refresh browser:
Chroma/Python Dependency Issues (v5.0.0+)
Symptoms: Installation fails with chromadb or Python-related errors. Solutions:-
Verify Python 3.8+ is installed:
-
Install chromadb manually:
-
Check chromadb health:
-
Windows-specific: Ensure Python is in PATH:
- If Chroma continues to fail, hybrid search will gracefully degrade to SQLite FTS5 only
Smart Install Caching Issues (v5.0.3+)
Symptoms: Dependencies not updating after plugin update, stale version marker. Solutions:-
Clear install cache:
-
Force reinstall:
-
Check version marker:
- Restart Claude Code after manual install
Worker Service Issues
Worker Service Not Starting
Symptoms: Worker doesn’t start, or worker status shows it’s not running. Solutions:-
Check worker status:
-
Try starting manually:
-
Check worker logs for errors:
-
Full reset:
-
Verify Bun is installed:
Port Allocation Failed
Symptoms: Worker fails to start with “port already in use” error. Solutions:-
Check if port 37777 is in use:
-
Kill process using the port:
-
Or use a different port:
-
Verify new port:
Worker Keeps Crashing
Symptoms: Worker restarts repeatedly or fails to stay running. Solutions:-
Check error logs:
-
Check worker status:
-
Check database for corruption:
-
Verify Bun installation:
Worker Not Processing Observations
Symptoms: Observations saved but not processed, no summaries generated. Solutions:-
Check worker is running:
-
Check worker logs:
-
Verify database has observations:
-
Restart worker:
Manual Recovery for Stuck Observations
Symptoms: Observations stuck in processing queue after worker crash or restart, no new summaries appearing despite worker running. Background: As of v5.x, automatic queue recovery on worker startup is disabled. Users must manually trigger recovery to maintain explicit control over reprocessing and prevent unexpected duplicate observations. Solutions:Option 1: Use CLI Recovery Tool (Recommended)
The interactive CLI tool provides the safest and most user-friendly recovery experience:- ✅ Checks worker health before proceeding
- ✅ Shows detailed queue summary (pending, processing, failed, stuck)
- ✅ Groups messages by session with age and status breakdown
- ✅ Prompts user to confirm processing (unless
--processflag used) - ✅ Shows recently processed messages for feedback
Option 2: Use HTTP API Directly
For automation or scripting scenarios:-
Check queue status:
Response shows:
queue.totalPending: Messages waiting to processqueue.totalProcessing: Messages currently processingqueue.stuckCount: Processing messages >5 minutes oldsessionsWithPendingWork: Session IDs needing recovery
-
Trigger manual recovery:
Response includes:
totalPendingSessions: Total sessions with pending messagessessionsStarted: Number of sessions we started processingsessionsSkipped: Sessions already processing (not restarted)startedSessionIds: Database IDs of sessions started
Understanding Queue States
Messages progress through these states:- pending - Queued, waiting to process
- processing - Currently being processed by SDK agent
- processed - Completed successfully
- failed - Failed after 3 retry attempts
processing state for >5 minutes are considered stuck and automatically reset to pending on worker startup (but not automatically reprocessed).
Recovery Strategy
When to use manual recovery:- After worker crashes or unexpected restarts
- When observations appear saved but no summaries generated
- When queue status shows stuck messages (processing >5 minutes)
- After system crashes or forced shutdowns
- Always check queue status before triggering recovery
- Use the CLI tool for interactive sessions (provides feedback)
- Use the HTTP API for automation/scripting
- Start with a low session limit (5-10) to avoid overwhelming the worker
- Monitor worker logs during recovery:
npm run worker:logs - Check recently processed messages to confirm recovery worked
Troubleshooting Recovery Issues
If recovery fails or messages remain stuck:-
Verify worker is healthy:
-
Check database for corruption:
-
View stuck messages directly:
-
Force reset stuck messages (nuclear option):
Then trigger recovery:
-
Check worker logs for SDK errors:
Understanding the Queue Table
Thepending_messages table tracks all messages with these key fields:
Hook Issues
Hooks Not Firing
Symptoms: No context appears, observations not saved. Solutions:-
Verify hooks are configured:
-
Test hooks manually:
-
Check hook permissions:
-
Verify hooks.json is valid JSON:
Context Not Appearing
Symptoms: No session context when Claude starts. Solutions:-
Check if summaries exist:
-
View recent sessions:
-
Check database integrity:
-
Manually test context hook:
Hooks Timeout
Symptoms: Hook execution times out, errors in Claude Code. Solutions:-
Increase timeout in
plugin/hooks/hooks.json: -
Check worker is running (prevents timeout waiting for worker):
-
Check database size (large database = slow queries):
-
Optimize database:
Dependencies Not Installing
Symptoms: SessionStart hook fails with “module not found” errors. Solutions:-
Manually install dependencies:
-
Check npm is available:
-
Check package.json exists:
Database Issues
Database Locked
Symptoms: “database is locked” errors in logs. Solutions:-
Close all connections:
-
Check for stale locks:
-
Kill processes holding locks:
-
Restart worker:
Database Corruption
Symptoms: Integrity check fails, weird errors. Solutions:-
Check database integrity:
-
Backup database:
-
Try to repair:
-
Nuclear option - recreate database:
FTS5 Search Not Working
Symptoms: Search returns no results, FTS5 errors. Solutions:-
Check FTS5 tables exist:
-
Rebuild FTS5 tables:
-
Check triggers exist:
Database Too Large
Symptoms: Slow performance, large database file. Solutions:-
Check database size:
-
Vacuum database:
-
Delete old sessions:
-
Rebuild FTS5 after deletion:
MCP Search Issues
Search Tools Not Available
Symptoms: MCP search tools not visible in Claude Code. Solutions:-
Check MCP configuration:
-
Verify search server is built:
-
Rebuild if needed:
- Restart Claude Code
Search Returns No Results
Symptoms: Valid queries return empty results. Solutions:-
Check database has data:
-
Verify FTS5 tables populated:
-
Test simple query:
-
Check query syntax:
Token Limit Errors
Symptoms: “exceeded token limit” errors from MCP. Solutions:-
Follow 3-layer workflow (don’t skip to get_observations):
-
Reduce limit in search:
-
Use filters to narrow results:
-
Paginate results:
-
Batch IDs in get_observations:
Performance Issues
Slow Context Injection
Symptoms: SessionStart hook takes too long. Solutions:-
Reduce context sessions:
-
Optimize database:
-
Add indexes (if missing):
Slow Search Queries
Symptoms: MCP search tools take too long. Solutions:- Use more specific queries
- Add date range filters
- Add type/concept filters
- Reduce result limit
- Use index format instead of full format
High Memory Usage
Symptoms: Worker uses too much memory. Solutions:-
Check current usage:
-
Restart worker:
- Clean up old data (see “Database Too Large” above)
Installation Issues
Plugin Not Found
Symptoms:/plugin install claude-mem fails.
Solutions:
-
Add marketplace first:
-
Then install:
-
Verify installation:
Build Failures
Symptoms:npm run build fails.
Solutions:
-
Clean and reinstall:
-
Check Node.js version:
-
Check for TypeScript errors:
Missing Dependencies
Symptoms: “Cannot find module” errors. Solutions:-
Install dependencies:
-
Check package.json:
-
Verify node_modules exists:
Debugging
Enable Verbose Logging
Check Correlation IDs
Trace observations through the pipeline:Inspect Worker State
Database Inspection
Common Error Messages
”Worker service not responding”
Cause: Worker not running or port mismatch. Solution: Restart worker withnpm run worker:restart.
”Database is locked”
Cause: Multiple processes accessing database. Solution: Stop worker, kill stale processes, restart.”FTS5: syntax error”
Cause: Invalid search query syntax. Solution: Use simpler query, avoid special characters.”SQLITE_CANTOPEN”
Cause: Database file permissions or missing directory. Solution: Check~/.claude-mem/ exists and is writable.
”Module not found”
Cause: Missing dependencies. Solution: Runnpm install.
Getting Help
If none of these solutions work:-
Check logs:
-
Create issue: GitHub Issues
- Include error messages
- Include relevant logs
- Include steps to reproduce
- Check existing issues: Someone may have already solved your problem
Next Steps
- Configuration - Customize Claude-Mem
- Development - Build from source
- Architecture - Understand the system

