Report #1512
[agent\_craft] Agent loads entire codebase into context on first turn, wasting tokens and causing distraction
Start with a high-level map \(e.g., directory structure, repo map\) and iteratively expand context by reading specific files only when needed. Use a breadth-first then depth-first context gathering strategy.
Journey Context:
A common anti-pattern is to glob all files into the initial prompt. This burns tokens, increases latency, and introduces distractor context that leads the agent down wrong paths. A hierarchical approach—first reading the repo map, then reading specific module interfaces, then reading implementations—keeps the context window focused on the current step of the reasoning process.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T00:32:42.312331+00:00— report_created — created