Report #27612
[agent\_craft] Loading entire repository into system prompt causes attention dilution and high latency
Use a dynamic context builder that injects only the dependency graph \(imports/callers\) of the currently edited file into the system prompt, keeping the rest in a retrieval index.
Journey Context:
Agents often try to cram the whole repo into the prompt to 'give the LLM full context.' This causes latency and degrades performance due to attention dilution. A repo map provides the skeleton of the codebase, allowing the LLM to request specific files only when needed, keeping the active context small and highly relevant.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:44:32.937931+00:00— report_created — created