Claude Code shows “No previous memories found” message
claude-mem load-context returns empty results
Causes & Solutions:
1
Check if memories exist
Copy
Ask AI
ls -la ~/.claude-mem/index/# Should contain index.jsonl file
No index file means no memories created yet. Start a Claude Code session to create memories automatically.
2
Verify project name filtering
Copy
Ask AI
# Check what project name is being usedpwd # Note your current directory name# Load context without project filterclaude-mem load-context# Load context for specific projectclaude-mem load-context --project your-project-name
Memory loading is filtered by project name (current directory). If your directory name changed, memories might be filtered out.
3
Check memory format
Copy
Ask AI
head -5 ~/.claude-mem/index/index.jsonl
Each line should be valid JSON. If you see corruption, restore from backup:
Copy
Ask AI
claude-mem restore# Select index backup if available
Cause: PATH differences between terminal and Claude Code environmentSolution:
1
Find claude-mem location
Copy
Ask AI
which claude-mem# Note the full path, e.g., /usr/local/bin/claude-mem
2
Use explicit path installation
Copy
Ask AI
# If using npm global install:claude-mem install --force# If still failing, check npm global bin directory:npm config get prefix# Ensure this path is in your system PATH
3
Verify hook scripts
Copy
Ask AI
# Check hook contentcat ~/.claude-code/hooks/session-start.sh# Should contain proper path to claude-mem
node --version# Should be 18.0.0 or higher# If older version, update Node.js
3
Clear and rebuild index
Copy
Ask AI
# Backup existing datacp ~/.claude-mem/index/index.jsonl ~/.claude-mem/index/index.jsonl.backup# Remove and let it rebuildrm ~/.claude-mem/index/index.jsonl# Start a new Claude Code session to rebuild
# Option 1: Use npx (recommended)npx claude-mem install# Option 2: Fix npm permissions (macOS/Linux)sudo chown -R $USER /usr/local/lib/node_modules# Option 3: Use node version manager# Install nvm and use node without sudo
Command Not Found After Install
Error: claude-mem: command not foundSolution:
Copy
Ask AI
# Check if installednpm list -g claude-mem# Find npm global bin directorynpm config get prefix# Add to PATH: export PATH="$PATH:$(npm config get prefix)/bin"# Or use full path$(npm config get prefix)/bin/claude-mem status
Multiple Node.js Versions Conflict
Error: Version conflicts or installation in wrong locationSolution:
Copy
Ask AI
# Check current node versionnode --versionwhich node# If using nvm, ensure correct version is activenvm use node # or specific version# Reinstall claude-mem with correct node versionnpm uninstall -g claude-memnpm install -g claude-mem
Problem: Installed at user level but need project level (or vice versa)Solution:
Copy
Ask AI
# Remove all installationsclaude-mem uninstall --all# Install at correct levelclaude-mem install --user # For all projectsclaude-mem install --project # For current project only
# Test session start hookecho '{"source":"manual","payload":{}}' | ~/.claude-code/hooks/session-start.sh# Test session end hook (create dummy transcript first)echo '{"transcriptPath":"/tmp/test.json"}' | ~/.claude-code/hooks/session-end.sh# Check hook outputecho $? # Should be 0 for success
Check Recent Changes: Review what changed before the problem started
Collect Debug Info: Run claude-mem status and claude-mem logs --error
Test in Clean Environment: Try in a new directory with minimal setup
Check Version Compatibility: Ensure Claude Code and Node.js versions are supported
Quick Reset: Most issues are resolved by running claude-mem install --force and restarting Claude Code. This refreshes all components and often resolves integration problems.
Remember: claude-mem is designed to “fail gracefully” - if memory loading fails, Claude Code will continue to work normally, just without the previous context.