Report #30597
[agent\_craft] Agent loading massive log files or data outputs into context window instead of executing a script to parse them
Externalize data processing to code execution \(e.g., Python REPL/bash\) and only return the aggregated result or summary to the context.
Journey Context:
Agents often try to read a 10,000-line log file into context to find an error, which blows up the context window and degrades reasoning. The agent should write a Python script to grep/parse the file and print the result, keeping the context clean. Code is a better calculator and parser than an LLM.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:44:24.975027+00:00— report_created — created