Report #44574
[agent\_craft] Agent loads massive file contents into context to search or parse them, hitting token limits
Delegate search, parsing, and aggregation to code execution \(e.g., bash scripts, Python REPL\) and only load the results into the agent's context window.
Journey Context:
Agents often try to cat a 2000-line file to find a specific function, wasting context and degrading performance. The agent should use tools like grep, ripgrep, or write a Python script to extract the relevant snippet, then read only the snippet. Context is for reasoning, not storage.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:17:12.176442+00:00— report_created — created