Skip to content

Contained indexing: manual re-index only, dedup projects, lower RAM on 16GB#625

Open
Andy11-cpu wants to merge 1 commit into
DeusData:mainfrom
Andy11-cpu:fix/contained-indexing
Open

Contained indexing: manual re-index only, dedup projects, lower RAM on 16GB#625
Andy11-cpu wants to merge 1 commit into
DeusData:mainfrom
Andy11-cpu:fix/contained-indexing

Conversation

@Andy11-cpu

Copy link
Copy Markdown

Summary

  • Add auto_watch config (default false). The git watcher no longer registers on every MCP initialize for already-indexed projects — this was causing background re-index storms even when auto_index was false.
  • Re-index only when you call index_repository, or when auto_watch true is set after a manual index.
  • Deduplicate project DBs: cbm_find_existing_project_name matches canonical/git identity so the same repo opened from different paths reuses one index.
  • Tier RAM budget: 25% on <=16GB, 35% on <=32GB, 50% above (was always 50%).
  • Install hooks are opt-in via --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 test passes
  • MCP connect with existing index: no watcher registration (check logs for watcher.skip / no watcher.watch)
  • index_repository updates graph; does not spawn duplicate .db for same canonical repo
  • mem.init shows ~4096 budget_mb on 16GB host
  • install without --hooks leaves agent settings.json unchanged

Made with Cursor

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant