Feeding command output back to an LLM: truncation, cleanup and secret masking
An agent runs npm test. The command prints 40,000 lines: progress bars, colour codes, a deprecation warning repeated 900 times, and, at the very end, the one assertion failure that matters. If you pas