Report #82256
[architecture] Agent repeatedly re-reads or gets confused by large, stale tool outputs like a massive JSON file that are still in the context window, distracting it from the current step
Implement context pruning: after a tool output is consumed and the agent moves to the next step, replace the large output in the message history with a summary or a placeholder like \[File X read, contained Y lines, key data extracted: Z\]
Journey Context:
Tool outputs consume massive token counts. Once the agent extracts the needed variable, the raw output is dead weight that eats context and degrades attention. Developers often just let the message array grow. Pruning or summarizing past tool outputs trades exact history for context efficiency, keeping the agent focused on the current state
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:39:28.584778+00:00— report_created — created