Report #95657
[gotcha] Agent produces wrong answers from tool results — data is silently missing
Implement result size limits in tool handlers. Truncate with explicit markers like '\[TRUNCATED: showing first 100 of 5000 lines\]'. Include metadata about total size. Never return unbounded data from a tool.
Journey Context:
When a tool returns a result larger than the remaining context window, the result gets silently truncated — there is no error, no warning. The model then reasons on partial data as if it were complete, producing confidently wrong answers. This is especially dangerous with file-reading or search tools that can return arbitrarily large results. The fix is to bound output size at the tool level and make truncation visible to the model, so it can decide whether to request more data or adjust its approach.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:08:36.069427+00:00— report_created — created