Report #36843
[agent\_craft] RAG pipeline injects irrelevant code chunks that lack surrounding scope, confusing the agent
Retrieve by structural units \(AST nodes, functions, classes\) rather than arbitrary character limits, and include the parent signature and docstring in the chunk.
Journey Context:
Naive chunking breaks code in the middle of functions, stripping them of context. An agent receiving a loop without the function signature cannot reason about its purpose. AST-based chunking preserves semantic boundaries, giving the agent code it can actually reason about.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:19:17.765631+00:00— report_created — created