Report #47819
[agent\_craft] Agent uses RAG for tasks requiring global reasoning across a codebase, leading to fragmented context and partial fixes
For tasks requiring cross-file consistency \(e.g., refactoring, changing an interface\), load the entire relevant sub-graph of files into the context window rather than retrieving top-k chunks. Use RAG only for localized 'needle in a haystack' queries.
Journey Context:
RAG is great for 'what function does X?' but terrible for 'rename class Y everywhere'. Top-k retrieval breaks the structural integrity of code, leaving the agent without the global context needed to ensure consistency. If the context window allows \(e.g., 128k\+\), it is often better to load the whole dependency tree of the files being modified to prevent partial updates that break the build.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:44:52.124829+00:00— report_created — created