Troubleshooting Guide
July 21, 2025 · View on GitHub
This guide covers common issues and their solutions for claude-code-vector-memory.
Installation Issues
Virtual Environment Problems
Problem: venv/bin/activate not found or permission denied
❌ Virtual environment not found!
Solutions:
-
Recreate virtual environment:
rm -rf venv python3 -m venv venv source venv/bin/activate pip install -r requirements.txt -
Check Python version:
python3 --version # Should be 3.8+ which python3 -
Fix permissions:
chmod +x venv/bin/activate chmod +x scripts/*.sh
Dependency Installation Failures
Problem: pip install fails for sentence-transformers or chromadb
Solutions:
-
Update base tools:
pip install --upgrade pip setuptools wheel -
Install system dependencies (Ubuntu/Debian):
sudo apt update sudo apt install python3-dev build-essential -
Install system dependencies (macOS):
xcode-select --install brew install python@3.9 -
Use conda instead of pip:
conda create -n claude-memory python=3.9 conda activate claude-memory conda install sentence-transformers chromadb rich spacy pytest
ChromaDB Installation Issues
Problem: ChromaDB fails to install or import
Solutions:
-
Install with specific version:
pip install chromadb==0.4.15 -
Clear pip cache:
pip cache purge pip install --no-cache-dir chromadb -
Use alternative installation:
pip install "chromadb[default]"
Runtime Issues
Database Connection Problems
Problem: Collection 'claude_summaries' not found
[red]Collection 'claude_summaries' not found in database.[/red]
Solutions:
-
Run initial indexing:
python scripts/index_summaries.py -
Check database directory:
ls -la chroma_db/ # Should contain chroma.sqlite3 and UUID directory -
Reset database completely:
rm -rf chroma_db/ python scripts/index_summaries.py
Search Returns No Results
Problem: Search queries return 0 results or very low similarity scores
Solutions:
-
Lower similarity threshold:
# In scripts/memory_search.py SIMILARITY_THRESHOLD = 0.20 # Lower from 0.30 -
Check indexed summaries:
python scripts/health_check.py -
Verify summary content:
ls ~/.claude/compacted-summaries/ head -20 ~/.claude/compacted-summaries/summary-*.md -
Rebuild index with verbose output:
python scripts/index_summaries.py
Embedding Model Issues
Problem: OSError: Can't load tokenizer or model download fails
Solutions:
-
Clear transformers cache:
rm -rf ~/.cache/huggingface/ -
Download model manually:
from sentence_transformers import SentenceTransformer model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2') -
Use offline model:
# Download once with internet, then use offline python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')" -
Alternative embedding model:
# In scripts/index_summaries.py and memory_search.py EMBEDDING_MODEL = "all-MiniLM-L6-v2" # Shorter name
Performance Issues
Slow Search Performance
Problem: Search takes >5 seconds or times out
Solutions:
-
Check system resources:
htop # Look for high CPU/memory usage df -h # Check disk space -
Optimize ChromaDB:
# Rebuild database with optimization python reindex.py -
Reduce embedding dimensions (advanced):
# Use smaller model EMBEDDING_MODEL = "all-MiniLM-L12-v2" # Faster but less accurate
Large Database Size
Problem: chroma_db/ directory becomes very large
Solutions:
-
Check database size:
du -sh chroma_db/ -
Clean up old embeddings:
rm -rf chroma_db/ python scripts/index_summaries.py -
Archive old summaries:
mkdir ~/.claude/archived-summaries mv ~/.claude/compacted-summaries/summary-2024-*.md ~/.claude/archived-summaries/ python reindex.py
Integration Issues
Claude Code Commands Not Working
Problem: /system:semantic-memory-search command not found
Solutions:
-
Check command files exist:
ls ~/.claude/commands/system/ -
Copy command files manually:
mkdir -p ~/.claude/commands/system/ cp claude-integration/commands/*.md ~/.claude/commands/system/ -
Verify CLAUDE.md integration:
grep "Memory Integration" ~/.claude/CLAUDE.md
Global Search Script Issues
Problem: claude-memory-search command not found
Solutions:
-
Check PATH:
echo $PATH which claude-memory-search -
Add to PATH (add to ~/.bashrc or ~/.zshrc):
export PATH="$HOME/agents:$PATH" -
Create symlink:
ln -sf ~/agents/claude-memory-search ~/.local/bin/claude-memory-search -
Use absolute path:
~/agents/claude-memory-search "search terms"
Data Issues
Missing Summary Files
Problem: Health check shows "missing summaries" or "0 indexed summaries"
Solutions:
-
Check summaries directory:
ls -la ~/.claude/compacted-summaries/ -
Verify file permissions:
find ~/.claude/compacted-summaries/ -name "*.md" -type f -
Create test summary if none exist:
echo -e "---\ntitle: Test Summary\ndate: $(date +%Y-%m-%d)\n---\n\nThis is a test summary." > ~/.claude/compacted-summaries/test-summary.md python scripts/index_summaries.py
Corrupted Database
Problem: Database errors or inconsistent results
Solutions:
-
Backup and reset:
cp -r chroma_db/ chroma_db_backup/ rm -rf chroma_db/ python scripts/index_summaries.py -
Check database integrity:
python scripts/health_check.py -
Validate with test search:
./search.sh "test query" # On Linux/macOS search.bat "test query" # On Windows
System-Specific Issues
macOS Issues
Problem: Permission denied or code signing issues
Solutions:
-
Allow Python in Security & Privacy
-
Use system Python:
/usr/bin/python3 -m venv venv -
Install with Homebrew:
brew install python@3.9 /opt/homebrew/bin/python3 -m venv venv
Windows Issues (WSL)
Problem: Path or permission issues in WSL
Solutions:
-
Use WSL paths consistently:
cd /home/username/agents/claude-code-vector-memory -
Fix line endings:
dos2unix scripts/*.sh chmod +x scripts/*.sh -
Install Windows dependencies:
sudo apt install python3-dev gcc g++
Diagnostic Commands
Run these to gather information for bug reports:
# System info
python3 --version
pip --version
uname -a
# Project status
cd ~/agents/claude-code-vector-memory
python scripts/health_check.py
./search.sh "diagnostic test"
# Environment check
which python3
echo $PATH
ls -la venv/bin/
# Database status
ls -la chroma_db/
du -sh chroma_db/
# Dependencies
pip list | grep -E "(chromadb|sentence-transformers|rich)"
Getting Help
If troubleshooting doesn't resolve your issue:
- Run full diagnostics and save output
- Check GitHub issues for similar problems
- Create new issue with:
- Operating system and version
- Python version
- Complete error messages
- Diagnostic command output
- Steps to reproduce
Include the output of:
python ~/agents/claude-code-vector-memory/scripts/health_check.py > health_report.txt