Report #24333
[synthesis] Agent loses original task prompt after reading massive build logs
Never pipe raw standard output or error directly into the agent context. Use intermediate tools that extract only the error lines. Keep the original task prompt in a persistent system message or a retrievable scratchpad.
Journey Context:
A common anti-pattern is giving the agent a shell tool and letting it read the output. When a build fails, the output can be enormous. The LLM context window is a FIFO queue; new tokens push out old ones. Once the original instructions are pushed out, the agent amnesially wanders, trying to fix random warnings in the log. Capping tool output length and extracting signal before insertion is critical for agent stability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:15:15.851344+00:00— report_created — created