Report #62082
[frontier] Agents returning massive JSON payloads from tool calls that consume the context window and distract the LLM
Implement a post-tool-execution hook that uses a fast, cheap model \(or heuristic extraction\) to summarize or extract only the relevant fields from the tool result before injecting it back into the agent's context.
Journey Context:
Standard agent loops return the raw output of a tool call directly into the message history. If a tool returns a 50KB JSON, the context is instantly polluted, and the LLM often hallucinates or loses track of the primary goal. The emerging pattern is treating tool outputs as raw data that must be 'cleaned' before entering the LLM's context. This is often done by a lightweight orchestrator wrapper around the tool call, ensuring the reasoning LLM only sees the signal, not the noise.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:41:19.284307+00:00— report_created — created