-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
memory_search: chokidar file watcher silently stops delivering events, index goes stale #40088
Copy link
Copy link
Open
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
Summary
The memory search vector index stops updating after the chokidar file watcher silently stops firing events. Files modified after this point are never re-indexed, causing
memory_searchto return 0 results for content that exists on disk. No error or warning is logged when the watcher fails.Environment
Reproduction
memory/andmemory/subdir/(e.g. daily notes, reference docs)memory_searchfor content that exists in recently modified files~/.openclaw/memory/main.sqlite) shows stalesize/mtimefor the modified filesInvestigation
Watcher setup (correct):
The code at
manager-*.jsline ~2244 creates:inotify watches (incomplete):
Inspecting
/proc/<gateway-pid>/fdinfo/<inotify-fd>shows only 8 watches. Thememory/directory has a watch, but subdirectories under it (e.g.memory/subdir/) do not — despite the**/*.mdglob which should trigger recursive watching via chokidar.Timeline:
[memory] sync: indexing memory fileslog entry at T+1h (triggered by a session that modified files)memory/*.mdfiles also not synced (not just subdirectory files)No fallback:
sync.intervalMinutesdefaults to0(disabled), so when the watcher stops working there is no periodic fallback to catch stale files.Workaround
Setting
agents.defaults.memorySearch.sync.intervalMinutes: 30provides a safety net.openclaw memory index --forcecan manually trigger a full reindex.Suggested fix
intervalMinutesto a non-zero value (e.g. 15-30 min) as a fallbackreadyevent doesn't fire or if no change events are received for an extended period despite files being modified