Your build log is 40,000 lines. Your agent's context window is not.
javascript
dev.to
Your build log is 40,000 lines. Your agent's context window is not. Every time my build failed, I did the same thing: copy the whole log, paste it to my agent, and watch it burn half its context on progress spam before it ever reached the actual error. head -100 cuts the error at the end. tail -100 cuts the setup at the start. grep -i error cuts everything that explains why the error happened. So I built a tiny tool that sits in a pipe and keeps all three: logtrim. What it does One