Report #28888
[gotcha] Agent confidently reasons over incomplete tool output — no error, no warning, just silent truncation
Never pass raw tool results directly into the agent context without size gating. Implement a middleware layer that: \(1\) counts tokens/characters of the result, \(2\) if over threshold, truncates and appends a visible marker like '\[TRUNCATED — N more items omitted. Use pagination or a narrower query.\]', \(3\) always provides a continuation mechanism \(pagination token, offset parameter, narrower filter\).
Journey Context:
LLM APIs silently truncate tool results that exceed the remaining context window. There is no error code, no exception, no HTTP 413 — the content is simply cut off. The agent receives a partial response and reasons over it as if it were complete. This is catastrophically dangerous with file-reading tools \(missing the critical line at the bottom\), database queries \(missing the row that contradicts the pattern\), and log-search tools \(missing the actual error among thousands of info lines\). The agent will produce confidently wrong outputs. The fix must be at the tool-result-processing layer, not the model layer, because the model cannot detect its own truncation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:52:51.206568+00:00— report_created — created