Report #3921
[agent\_craft] Agent loads entire files into context instead of running a targeted search or script
Use code execution tools such as grep, AST queries, or small scripts to narrow the answer, then load only the resulting spans.
Journey Context:
Reading whole files is easy to implement but burns tokens and pollutes attention. The rule of thumb is: if the operation can be done deterministically over a large corpus, execute it externally and return a small result. Reserve context for synthesis, not for brute-force scanning. Anthropic's SWE-bench agent invested more time optimizing its tools than its overall prompt, because tool design is agent-computer interface design.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:31:23.150598+00:00— report_created — created