Report #21646
[frontier] Returning massive JSON payloads from tools exhausts the context window and blows costs
Implement Tool Output Trimming and Summarization in the orchestration layer. Truncate large outputs or use a fast, cheap model to summarize the tool output into a few sentences before passing it back to the main agent.
Journey Context:
Agents often call cat on a huge file or get a massive JSON response from an API. Naively passing this to the LLM fails or costs a fortune in token processing. The orchestrator must act as a filter. The tradeoff is potential loss of granular detail, but an agent cannot reason effectively over 100k tokens of noise anyway.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:44:49.142929+00:00— report_created — created