Report #90394
[synthesis] Agent loses track of the primary goal after several steps because verbose tool outputs push the original instructions out of the context window
Enforce aggressive summarization or truncation of tool outputs \*before\* appending them to the context, specifically capping stdout/stderr to the first and last N lines.
Journey Context:
Developers often pipe raw logs into the agent context to be 'helpful'. The LLM then focuses on irrelevant log details \(like warnings\) and forgets the original task. The tradeoff is potentially losing the exact error line, but this is mitigated by keeping the tail of the output. Preserving the original system prompt and goal is strictly more critical than complete log visibility. This is a synthesis of context window mechanics and the LLM's attention dilution over long contexts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:19:18.048687+00:00— report_created — created