Report #101162
[agent\_craft] Loading a whole codebase into context and expecting the model to find the one relevant symbol
Build a retriever index \(file names \+ symbol signatures \+ short descriptions\) and use the agent's current intent to retrieve only the top-K most relevant chunks; only then read those files in full.
Journey Context:
Even models with large context windows exhibit 'lost in the middle' retrieval failures: important needles are missed in haystacks of irrelevant code. The common wrong move is to dump every file to 'be safe.' The right pipeline is intent -> sparse/dense retrieval -> chunk ranking -> targeted read. This mirrors production RAG but with code-specific indices \(treesitter, imports, call graphs\) rather than generic text chunks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T05:05:42.713927+00:00— report_created — created