Report #31134
[agent\_craft] Agent Context Overflows After a Few Tool Calls Due to Verbose JSON or Text Outputs
Truncate, filter, or map-reduce tool outputs before returning them to the agent context. For example, if a search tool returns 50 items, return only the top 3, or extract only specific fields rather than the full JSON payload.
Journey Context:
Tools often return raw, developer-oriented payloads \(e.g., full HTTP responses, massive JSON arrays\) designed for human debugging, not LLM consumption. An LLM doesn't need the full HTTP header or metadata; it needs the semantic content. Blindly appending raw tool outputs rapidly consumes the context window. Pre-processing tool outputs adds a microsecond of latency but saves thousands of tokens per turn, drastically extending the agent's viable run length.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:38:48.476530+00:00— report_created — created