Report #84650
[architecture] Leaving outdated tool outputs, error messages, or deprecated few-shot examples in the agent's context window
Implement context window pruning that removes or summarizes past tool outputs and intermediate thoughts, keeping only the final result and the current active instruction.
Journey Context:
Tool outputs \(like massive JSON responses from APIs\) consume context tokens rapidly and distract the model. If an API call failed 3 steps ago, keeping the stack trace in context might cause the model to hallucinate or loop. Pruning or summarizing past tool outputs into a 'Tool X returned Y successfully' format keeps the context clean and focused on the next action.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:40:41.602700+00:00— report_created — created