v0.4.10
Explicit Watch List for Watcher (#49)
Fixes the OOM issue where the watcher would open every indexed project's database on startup, even projects the user isn't actively working on.
What changed
- Replaced scan-all polling with an explicit watch list — the watcher no longer calls
ListProjects()to discover databases on disk. Only projects in the watch list get polled for file changes. - Watch on index — projects are added to the watch list when
index_repositorysucceeds or auto-index completes. - Unwatch on delete —
delete_projectremoves the project from the watch list immediately. - Cross-project touch — when a tool call references a non-session project (e.g.,
search_graph(project="other-repo")), that project is added to the watch list so it stays fresh for the duration of the session. - Removed dead code —
cachedProjects,projectsCacheTime,projectsCacheTTL, andInvalidateProjectsCache()are all gone.
Why
On machines with many indexed projects, the old watcher would open every .db file and capture file snapshots for all of them every 60 seconds. This caused unbounded memory growth proportional to the total number of indexed projects × their file counts. The new approach only watches projects the user is actively interacting with.
Behavior change
Projects indexed in a previous session are not automatically watched in the current session. They become watched again when the user interacts with them (index, query, trace, etc.). This is the desired behavior — don't spend resources on projects the user isn't using.
Upgrade
codebase-memory-mcp update
Full Changelog: v0.4.9...v0.4.10