Report #96980
[gotcha] A tool returns megabytes of data, exceeding the LLM context window, crashing the client, or incurring massive token costs
Enforce strict size limits on tool return payloads; truncate or summarize large outputs locally before sending them back to the LLM.
Journey Context:
Agents often run \`cat large\_file.log\`. The tool faithfully returns the whole file. This either breaks the API call \(token limit exceeded\) or costs a fortune. The fix requires the tool to be 'LLM-aware' and return only a relevant excerpt, or the orchestrator must truncate it, losing potentially important signal at the edges.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T21:21:51.947721+00:00— report_created — created