Summary
clawdbot status and clawdbot memory status always show the memory index as "dirty", even when all files are indexed and the gateway's in-process index is clean.
Root Cause
In dist/memory/manager.js (~line 144), the MemoryIndexManager constructor unconditionally sets:
this.dirty = this.sources.has("memory"); // always true when sources include "memory"
The CLI commands (clawdbot status, clawdbot memory status) create a fresh MemoryIndexManager instance in dist/commands/status.scan.js (~line 101). This new instance starts with dirty = true, calls probeVectorAvailability() and status(), then closes — never running a sync that would clear the flag.
So the CLI can never report dirty: no unless --deep --index is used (which forces a sync within that process).
Steps to Reproduce
- Run
clawdbot memory index (full reindex, completes successfully)
- Run
clawdbot status or clawdbot memory status
- Memory still shows "dirty"
Expected Behavior
Status should reflect the actual index state. If all files are indexed and no changes are pending, dirty should be no.
Possible Fixes
- Query the running gateway's in-process dirty state instead of creating a new manager instance
- Don't default
dirty = true on construction; instead compare file mtimes against indexed timestamps
- Run a lightweight dirty check (e.g. hash comparison) in the status path without requiring a full sync
Workaround
clawdbot memory status --deep --index forces a sync and temporarily clears the flag, but only for that CLI invocation.
Environment
- Version: 2026.1.24-3
- OS: Linux 6.14.0-37-generic (x64)
- Node: v22.22.0
- Memory provider: openai (via Ollama, nomic-embed-text)
Summary
clawdbot statusandclawdbot memory statusalways show the memory index as "dirty", even when all files are indexed and the gateway's in-process index is clean.Root Cause
In
dist/memory/manager.js(~line 144), theMemoryIndexManagerconstructor unconditionally sets:The CLI commands (
clawdbot status,clawdbot memory status) create a freshMemoryIndexManagerinstance indist/commands/status.scan.js(~line 101). This new instance starts withdirty = true, callsprobeVectorAvailability()andstatus(), then closes — never running a sync that would clear the flag.So the CLI can never report
dirty: nounless--deep --indexis used (which forces a sync within that process).Steps to Reproduce
clawdbot memory index(full reindex, completes successfully)clawdbot statusorclawdbot memory statusExpected Behavior
Status should reflect the actual index state. If all files are indexed and no changes are pending, dirty should be
no.Possible Fixes
dirty = trueon construction; instead compare file mtimes against indexed timestampsWorkaround
clawdbot memory status --deep --indexforces a sync and temporarily clears the flag, but only for that CLI invocation.Environment