Report #12598
[agent\_craft] Agents waste tokens loading full file contents when only function signatures or import graphs are needed for repository navigation
Use hierarchical repo maps: present a ctags-based outline \(symbols and relationships\) as the initial context, and require the agent to use \`view\_chunk\` or \`search\` tools to request specific code blocks on demand
Journey Context:
Dumping entire files into context quickly exhausts token limits in large repositories and drowns the signal in noise. Humans navigate codebases using 'go to definition' and 'find references' - they don't memorize entire files. A repo map \(generated via tree-sitter or ctags\) provides the structural graph \(classes, functions, imports\) at ~1% of the token cost. The agent then requests specific chunks, ensuring context is relevant and bounded. This trades initial latency \(multiple round trips\) for accuracy and scalability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:22:40.865502+00:00— report_created — created