Bug Description
Session files are being saved correctly to ~/.Hermes/sessions/, but session_search fails to find content that clearly exists within those session files.
Reproduction
- Conduct a multi-session conversation involving a specific topic (e.g., "大别山项目")
- Verify session files exist:
ls ~/.Hermes/sessions/session_20260424_*.json | wc -l
- Run
session_search(query="topic_keyword")
- Compare results with direct grep:
grep -r "keyword" ~/.Hermes/sessions/session_20260424_*.json | wc -l
Actual Results
| Method |
Match Count |
grep on session files |
148 matches |
session_search |
1 match |
Session files are ~500KB each and clearly contain the keyword "大别山", yet session_search returns almost nothing.
Environment
- Hermes version: 1.0.0 (from
hermes-agent package.json)
- OS: macOS
- Session file count: 153 files for 2026-04-24 alone
- Total session storage: significant (multiple GB)
Root Cause Hypothesis
- Indexing issue: The session search index may not be built or updated properly
- Context Compaction side effect: When context is compacted, the full content may be replaced by a summary that loses searchable detail
- FTS5 configuration: Session search likely uses SQLite FTS5 — the index may be stale or not rebuilt after session updates
Expected Behavior
session_search should return all sessions containing the query keyword, matching what grep finds.
Impact
- Historical conversations are effectively unsearchable
- This breaks the core value proposition of persistent memory across sessions
- Users cannot retrieve past work, research, or decisions
Workaround
Manual grep works but is not user-friendly:
grep -r "keyword" ~/.Hermes/sessions/session_*.json | head -20
Bug Description
Session files are being saved correctly to
~/.Hermes/sessions/, butsession_searchfails to find content that clearly exists within those session files.Reproduction
ls ~/.Hermes/sessions/session_20260424_*.json | wc -lsession_search(query="topic_keyword")grep -r "keyword" ~/.Hermes/sessions/session_20260424_*.json | wc -lActual Results
grepon session filessession_searchSession files are ~500KB each and clearly contain the keyword "大别山", yet
session_searchreturns almost nothing.Environment
hermes-agentpackage.json)Root Cause Hypothesis
Expected Behavior
session_searchshould return all sessions containing the query keyword, matching whatgrepfinds.Impact
Workaround
Manual grep works but is not user-friendly: