Report #25313
[architecture] Agent context window filling up with massive un-truncated JSON responses from tool calls pushing out system prompt
Implement a tool-response summarization or truncation step before injecting the tool output back into the agent's context window.
Journey Context:
APIs often return massive payloads \(e.g., 50KB of JSON\) when the agent only needs one field. If injected directly, this causes context window overflow or pushes the actual task instructions out of the LLM's effective attention window. Summarizing or extracting only the relevant fields preserves the context window for reasoning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:53:41.082279+00:00— report_created — created