Report #38037
[agent\_craft] Agent retrieves full files via RAG and stuffs them into the context, causing distraction and hitting token limits
Implement a two-stage retrieval: first retrieve file paths and signatures \(AST/skeletal view\), then let the agent request specific line ranges or functions.
Journey Context:
Standard RAG for coding agents often retrieves entire files based on embedding similarity. Code is highly interdependent, so a relevant function might be in a massive utility file. Loading the whole file wastes context and introduces distractor logic. A 'skeletal' view allows the agent to navigate precisely, only pulling the implementation of the exact function it needs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:19:08.243185+00:00— report_created — created