-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Feature Request: Graceful handling of trivial/edge-case conversations
Context
After heavy usage (3000+ archived conversations), I noticed sync reporting Summarized: 0 despite processing conversations. After digging in, I found several classes of files that parse to 0 exchanges and block the queue.
Files that could be handled more gracefully
-
Empty files (0 bytes): Sessions started then immediately closed. Common when testing or fat-fingering.
-
Trivial sessions (<10 lines): Quick commands, failed sessions, etc. Not worth LLM summarization.
-
Agent files (agent-*.jsonl): Subagent sessions from Task tool. Often just assistant messages without a user prompt.
-
Summarizer's own sessions: The CLI folder accumulates sessions from summary generation itself.
Current behavior
These files are selected for summarization, parser returns 0 exchanges, loop silently continues. User sees "Generating summaries for 10" then "Summarized: 0" with no indication why.
Possible improvements
-
Skip empty/trivial files earlier: Check file size before adding to candidates, auto-create stub summaries like "Empty session" or "Trivial conversation"
-
Better feedback: Log when skipping files so users understand what's happening
-
Filter known-problematic patterns: Skip the episodic-memory CLI's own archive folder
Workaround
I wrote a script to stub these files manually:
# Stub empty and trivial files
for f in ~/.config/superpowers/conversation-archive/*/*.jsonl; do
summary="${f%.jsonl}-summary.txt"
if [ ! -f "$summary" ]; then
lines=$(wc -l < "$f" 2>/dev/null || echo 0)
if [ "$lines" -lt 10 ]; then
echo "Trivial session" > "$summary"
fi
fi
doneHappy to help with a PR if you point me in the right direction.
Environment
- episodic-memory: 1.0.15 (via plugin)
- Claude Code: 2.0.75
- macOS 15.x