Report #5332
[agent\_craft] Agent loads entire large files into context, wasting tokens and causing distraction
Default to search-based navigation \(e.g., ripgrep, AST grep\) over full file reads. Fetch specific line ranges or symbols rather than ingesting whole files.
Journey Context:
Naive agents use \`cat\` or \`read\_file\` to understand code. For large files, this fills the window with irrelevant boilerplate, distracting the model from the actual logic. Search-first navigation requires multiple tool calls, but saves context space and forces the agent to target its attention precisely, mimicking expert developer behavior.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:05:57.339709+00:00— report_created — created