Systematic solutions for common claude-mem issues. Most problems resolve in under 2 minutes.

Quick Diagnosis

Start with status command to identify issues:
claude-mem status
Status output reveals the problem:

Common Error Messages

”No memories found” on Session Start

Symptoms:
  • Claude Code shows “No previous memories found” message
  • claude-mem load-context returns empty results
Causes & Solutions:
1

Check if memories exist

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

# Check what project name is being used
pwd  # Note your current directory name

# Load context without project filter
claude-mem load-context

# Load context for specific project
claude-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

head -5 ~/.claude-mem/index/index.jsonl
Each line should be valid JSON. If you see corruption, restore from backup:
claude-mem restore
# Select index backup if available

“Hook execution timeout” Errors

Symptoms:
  • Claude Code startup hangs or shows timeout errors
  • Session end takes unusually long
Solution:
1

Increase timeout

claude-mem install --timeout 300000  # 5 minutes
2

Check for blocking processes

# View logs to identify what's blocking
claude-mem logs --error --tail 100
3

Reinstall with verbose output

claude-mem install --force
# Watch for specific error messages

“Cannot find claude-mem command”

Symptoms:
  • Hook scripts fail with “command not found”
  • Works in terminal but not in Claude Code
Cause: PATH differences between terminal and Claude Code environment Solution:
1

Find claude-mem location

which claude-mem
# Note the full path, e.g., /usr/local/bin/claude-mem
2

Use explicit path installation

# 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

# Check hook content
cat ~/.claude-code/hooks/session-start.sh
# Should contain proper path to claude-mem

“Chroma database connection failed”

Symptoms:
  • Memories aren’t being saved
  • Context loading fails with database errors
Solution:
1

Reset Chroma database

# Remove corrupted database
rm -rf ~/.claude-mem/chroma/

# Reinstall and recreate
claude-mem install --force
2

Check Node.js compatibility

node --version
# Should be 18.0.0 or higher

# If older version, update Node.js
3

Clear and rebuild index

# Backup existing data
cp ~/.claude-mem/index/index.jsonl ~/.claude-mem/index/index.jsonl.backup

# Remove and let it rebuild
rm ~/.claude-mem/index/index.jsonl

# Start a new Claude Code session to rebuild

Installation Issues

Global Package Installation Problems

Claude Code Integration Issues

Memory and Storage Issues

Disk Space Problems

# Check claude-mem storage usage
du -sh ~/.claude-mem/

# Clean up old archives (keeps last 50)
claude-mem trash empty

# Manually clean old archives if needed
find ~/.claude-mem/archives/ -name "*.json" -mtime +30 -delete

Corrupted Memory Index

Symptoms: Load-context shows malformed data or errors Recovery Steps:
1

Backup current index

cp ~/.claude-mem/index/index.jsonl ~/.claude-mem/index/index.jsonl.corrupted
2

Rebuild from archives

# Remove corrupted index
rm ~/.claude-mem/index/index.jsonl

# Recompress recent archives
find ~/.claude-mem/archives/ -name "*.json" -mtime -7 | xargs -I {} claude-mem compress "{}"
3

Restore from trash if available

claude-mem restore
# Select any index backup files

Performance Issues

Slow Memory Loading

Symptoms: Claude Code takes long time to start Solutions:
1

Reduce memory count

# Load fewer memories (default is 10)
claude-mem load-context --count 5
Edit the hook to load fewer memories permanently:
# Edit ~/.claude-code/hooks/session-start.sh
# Change: --count 10
# To: --count 5
2

Clean up old memories

# Check memory count
wc -l ~/.claude-mem/index/index.jsonl

# If > 1000 memories, consider archiving old ones
head -500 ~/.claude-mem/index/index.jsonl > ~/.claude-mem/index/index.jsonl.recent
mv ~/.claude-mem/index/index.jsonl ~/.claude-mem/index/index.jsonl.full
mv ~/.claude-mem/index/index.jsonl.recent ~/.claude-mem/index/index.jsonl

High Memory Usage

# Check if Chroma database is consuming too much memory
ps aux | grep chroma

# Restart claude-mem to reset memory usage
claude-mem install --force

Advanced Debugging

Enable Debug Logging

# Set debug environment variable
export CLAUDE_MEM_DEBUG=1

# Run commands with verbose output
claude-mem status
claude-mem load-context

# View detailed logs
claude-mem logs --debug --tail 100

Manual Hook Testing

Test hooks independently to isolate issues:
# Test session start hook
echo '{"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 output
echo $?  # Should be 0 for success

Database Recovery

If all else fails, reset the entire system:
This will delete all memories. Only use as a last resort.
# Backup everything
cp -r ~/.claude-mem ~/.claude-mem.backup

# Complete reset
rm -rf ~/.claude-mem
claude-mem install

# Restore archives if needed
cp -r ~/.claude-mem.backup/archives ~/.claude-mem/

# Recompress archives to rebuild index
find ~/.claude-mem/archives -name "*.json" | head -10 | xargs -I {} claude-mem compress "{}"

Getting Help

If these solutions don’t resolve your issue:
  1. Check Recent Changes: Review what changed before the problem started
  2. Collect Debug Info: Run claude-mem status and claude-mem logs --error
  3. Test in Clean Environment: Try in a new directory with minimal setup
  4. 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.

Support Information

When seeking support, include:
  • Output of claude-mem status
  • Node.js version (node --version)
  • Operating system
  • Recent error logs (claude-mem logs --error --tail 50)
  • Steps to reproduce the issue

Remember: claude-mem is designed to “fail gracefully” - if memory loading fails, Claude Code will continue to work normally, just without the previous context.