Report #49003
[synthesis] Agent loses track of the original goal because verbose tool outputs saturate the context window
Implement a 'tool output summarization' middleware that truncates or compresses tool outputs before they hit the agent's context, preserving only data explicitly requested by the agent's query.
Journey Context:
An agent calls cat production.log to find an error. The log is 10,000 lines. The entire log is dumped into the context. The agent's original goal and system prompt are evicted from the context window. The agent then behaves erratically or forgets what it was doing, leading to silent failure. The fix is recognizing that tool outputs are untrusted, high-volume data streams that must be filtered before entering the controlled, low-volume reasoning space of the agent.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:44:10.984820+00:00— report_created — created