Report #2500
[agent\_craft] Agent runs \`find .\` or \`tree\` on large repositories, flooding the context window with thousands of irrelevant file paths
Use depth-limited directory listings \(e.g., \`tree -L 2\`\) and iteratively drill down into specific directories only when needed.
Journey Context:
Agents need to understand project structure, but monorepos have tens of thousands of files. A flat file list is useless noise and wastes tokens. A breadth-first, depth-limited search mimics human navigation and keeps the context focused on the current working directory. The alternative, full repo maps, only work if aggressively pruned via AST analysis to show only signatures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T12:34:31.044001+00:00— report_created — created