Repository navigation
perf(memory): auto-index up to 8000 chunks, like memory index - #472
Merged
Merged
Conversation
The session auto-index capped the code index at 4000 chunks, half of what `whycodes memory index` and the memory tool use. Files are indexed in path order, so on this repo the cap ran out in crates/llm: 11 of 27 crates were searchable and recall could not reach session, tools, tui, memory, sandbox or storage. eval_code_recall.py (code-search with BM25 order and path boost): 4000 chunks: 35% on topic, 11/22 answered; held-out 31%, 6/12. 8000 chunks: 57%, 19/22; held-out 58%, 11/12. Indexing runs in the background and took 3.8 s -> ~6 s here. Also measured and rejected: skipping test files (frees room but loses on-topic test chunks once everything fits) and giving every file an even share first (fills the index with import headers; 58% -> 39%). Co-Authored-By: Claude Opus 5.5 <[email protected]>
mrnasil
added a commit
that referenced
this pull request
Nov 25, 2026
…474) catalog_models also lists OAuth providers that have a stored token, read from WHYCODES_HOME. catalog_models_merges_oauth_token_store_suggestions points that at a home holding a token under ENV_LOCK; the decision-model test read it without the lock, so when the two overlapped its "empty catalog" saw the token and failed (Coverage on #472). It now holds ENV_LOCK and uses an empty home of its own. Co-authored-by: Claude Opus 5.5 <[email protected]>
Merged
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.
Problem
The session auto-index caps the code index at
auto_index_max_chunks = 4000, half of whatwhycodes memory indexand the memory tool use (8000). Files are indexed in path order, so on this repo the cap ran out insidecrates/llm. 11 of 27 crates were searchable; turn recall could never surfacesession,tools,tui,memory,sandboxorstorage.Change
Default
auto_index_max_chunks4000 → 8000 (config default,MemorySettings::default,docs/config.md).Measured
scripts/eval_code_recall.py(from #470/#471), code-search with BM25 order + path boost, release build:Indexing runs in a background thread: 3.8 s → ~6 s on this repo.
Measured and rejected
Same harness, 4000 and 8000 caps:
Note
The auto-index is built only when the bank's index is empty (
ensure_code_index). Existing indexes keep their size untilwhycodes memory indexis run. The index is also never refreshed as code changes; that is a separate issue I'll look at next.Checks:
cargo test -p whycodes-config --lib(164),-p whycodes-memory --lib(90), clippy, fmt, ratchets.🤖 Generated with Claude Code