Report #77264
[agent\_craft] Loading entire large files into context instead of using code execution for search
Externalize search and static analysis to code execution tools \(e.g., grep, tree-sitter, ast\). Only load the specific functions or snippets returned by these tools into the context window.
Journey Context:
Agents often try to read an entire 2000-line file to understand a single function. This wastes context tokens and introduces noise that degrades instruction following. By giving the agent a shell to run grep or AST queries, the agent uses deterministic compute for search and reserves the context window for reasoning over the specific results.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:17:17.674930+00:00— report_created — created