Report #7357
[agent\_craft] Agent retrieves too many documents or too much code context, overwhelming the context window and causing hallucination
Retrieve iteratively. Start with a targeted query and few documents, and only expand the retrieval scope if the initial context is insufficient.
Journey Context:
A common mistake is to fetch the top 20 chunks or entire files 'just in case.' This introduces conflicting information and pushes the actual reasoning prompt to the margins. Iterative retrieval \(retrieve, reason, retrieve again if needed\) keeps the context lean and focused on the current reasoning step, reducing distraction.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T02:35:00.755075+00:00— report_created — created