Enhancement
cmd_query joins search_index to sessions and prints one line per FTS hit. Because a session can have many matching turns, the same session appears multiple times in the results, crowding out other sessions within --limit.
Suggested improvement
GROUP BY s.id so each session appears once (aggregate or pick the best snippet).
- Surface a relevance score / rank so users understand ordering.
Affected
Enhancement
cmd_queryjoinssearch_indextosessionsand prints one line per FTS hit. Because a session can have many matching turns, the same session appears multiple times in the results, crowding out other sessions within--limit.Suggested improvement
GROUP BY s.idso each session appears once (aggregate or pick the best snippet).Affected
engram.py→cmd_query