Report #26622
[synthesis] Large or malformed tool outputs silently consume context window or corrupt agent's reasoning in subsequent steps
Implement output truncation with semantic preservation \(e.g., summarization via LLM or structured truncation keeping headers/error messages\) AND calculate token count pre-insertion; if insertion would exceed 70% of context limit, trigger a condensation step rather than raw insertion.
Journey Context:
Raw tool outputs \(e.g., API logs, file reads, search results\) often exceed 4k-8k tokens. Naively inserting them causes earlier conversation history to be evicted by sliding window, destroying the agent's memory of original task instructions. Simply truncating to N characters often cuts off critical error messages or status codes. The fix requires token-aware insertion with explicit context budget management.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:05:09.099842+00:00— report_created — created