Bug
clawdbot memory index --agent <id> successfully indexes memory files but silently skips session transcripts (0 indexed), even when sources: ["memory", "sessions"] and experimental.sessionMemory: true are configured, and JSONL session files exist.
Root Cause
In manager.js, the constructor initializes the memory dirty flag but not the sessions dirty flag:
// line 144 — memory gets marked dirty on construction
this.dirty = this.sources.has("memory");
// sessionsDirty is never initialized — stays false
The sync decision in shouldSyncSessions() (line 754) falls through to:
return this.sessionsDirty && this.sessionsDirtyFiles.size > 0;
Since sessionsDirty is false on a fresh CLI invocation (no runtime file watchers running), session sync is always skipped. Memory files work because this.dirty starts as true.
Expected Behavior
clawdbot memory index should index both memory files and session transcripts when both sources are configured.
Suggested Fix
Initialize this.sessionsDirty in the constructor, matching the existing memory pattern:
this.dirty = this.sources.has("memory");
this.sessionsDirty = this.sources.has("sessions"); // add this
This ensures the first sync always picks up sessions, whether triggered from CLI or runtime.
Environment
- Version: 2026.1.24-3 (npm)
- Provider: local (BGE-base GGUF, Metal GPU)
- OS: macOS (Apple Silicon)
Repro
clawdbot memory index --agent venture --verbose
# Output: [memory] sync runs, [sessions] sync never triggers
# Result: 33/33 memory files indexed, 0/10 session files indexed
Bug
clawdbot memory index --agent <id>successfully indexes memory files but silently skips session transcripts (0 indexed), even whensources: ["memory", "sessions"]andexperimental.sessionMemory: trueare configured, and JSONL session files exist.Root Cause
In
manager.js, the constructor initializes the memory dirty flag but not the sessions dirty flag:The sync decision in
shouldSyncSessions()(line 754) falls through to:Since
sessionsDirtyisfalseon a fresh CLI invocation (no runtime file watchers running), session sync is always skipped. Memory files work becausethis.dirtystarts astrue.Expected Behavior
clawdbot memory indexshould index both memory files and session transcripts when both sources are configured.Suggested Fix
Initialize
this.sessionsDirtyin the constructor, matching the existing memory pattern:This ensures the first sync always picks up sessions, whether triggered from CLI or runtime.
Environment
Repro