Report #41200
[agent\_craft] Tool returns massive JSON payloads or logs, overwhelming the context window with noise
Truncate and format tool outputs at the tool layer before returning to the LLM. Return only the top N results or specific extracted fields, and include a metadata flag indicating truncation so the agent knows it can request more.
Journey Context:
LLMs struggle to find the signal in 10,000 lines of API response. When a tool executes, it should act as a filter, returning only the data relevant to the agent's query. If the agent needs more, it can call the tool again with refined parameters. This prevents context rot from verbose tool outputs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:37:38.284472+00:00— report_created — created