[FEATURE] Opt-in local codebase index to reduce search time and token cost in large repositories
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
On a very large C++ codebase, every new session re-discovers the project structure from scratch through repeated Grep/Glob calls. This is slow and burns a large number of tokens before any actual work begins, and the cost recurs every session because nothing from the previous exploration is retained. I understand that index-free agentic search is an intentional design decision, but on large repositories this repeated-scan cost becomes a real drag on both latency and token budget.
Proposed Solution
An opt-in, locally stored index that the built-in search tools (Grep/Glob) can consult. It can be lightweight — file paths and symbol names to start, with embeddings optional — and would be invalidated/updated on file changes. It must be opt-in so default behavior is unchanged for users who prefer pure agentic search. Even a minimal file/symbol index would significantly cut repeated-scan latency and token usage on large repos.
Alternative Solutions
Third-party MCP indexers exist but need extra setup and aren't integrated with the native search tools. The @-mention fuzzy file search helps for known filenames but doesn't cover symbol/content lookup.
Priority
Medium - Would be very helpful
Feature Category
Performance and speed
Use Case Example
_No response_
Additional Context
Project Size
Number of files: 35,000
Total lines: approximately 15.69 million lines