Contained indexing: manual re-index only, dedup projects, lower RAM on 16GB#625
Open
Andy11-cpu wants to merge 1 commit into
Open
Contained indexing: manual re-index only, dedup projects, lower RAM on 16GB#625Andy11-cpu wants to merge 1 commit into
Andy11-cpu wants to merge 1 commit into
Conversation
Stop registering the git watcher on every MCP initialize unless auto_watch is explicitly enabled (default false). Re-index only via index_repository or when auto_watch is turned on after a manual index. Also deduplicate project DBs by canonical/git identity, tier RAM budget to 25% on 16GB machines, and make install hooks opt-in via --hooks. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
auto_watchconfig (default false). The git watcher no longer registers on every MCPinitializefor already-indexed projects — this was causing background re-index storms even whenauto_indexwas false.index_repository, or whenauto_watch trueis set after a manual index.cbm_find_existing_project_namematches canonical/git identity so the same repo opened from different paths reuses one index.--hooks(PreToolUse Grep/Glob augmenter no longer installed by default).Motivation
On a 16GB Windows machine with multiple indexed projects, the MCP server reserved ~8GB RAM and pegged CPU from watcher-driven re-indexing plus hook-augment spawning on every Grep/Glob.
Test plan
make -f Makefile.cbm testpasseswatcher.skip/ nowatcher.watch)index_repositoryupdates graph; does not spawn duplicate .db for same canonical repomem.initshows ~4096 budget_mb on 16GB hostinstallwithout--hooksleaves agent settings.json unchangedMade with Cursor