Report #36633
[agent\_craft] Agent loads raw, verbose CLI output \(like npm install or docker build\) into the context, filling it with progress bars and noise
Always pipe tool outputs through a post-processor \(like tail, grep -v, or a custom script\) before returning to the LLM context. Strip ANSI codes, progress bars, and routine success logs; only return errors and the final summary line.
Journey Context:
A docker build can output 500 lines of 'Step X/10'. The LLM doesn't need that; it only needs 'Successfully built abc123' or 'ERROR: failed to fetch'. By truncating/summarizing tool outputs before they hit the context window, you save thousands of tokens and prevent the model from getting confused by noise.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:58:14.743904+00:00— report_created — created