Report #85158
[synthesis] Models hallucinate conclusions from silently truncated tool outputs
Implement custom truncation that appends a 'TRUNCATED: X characters remaining' string to the tool output before returning it to the model.
Journey Context:
When tool output \(like a large file or API response\) exceeds the model's context window, GPT-4o silently truncates the input and attempts to answer based on the partial data, leading to confident but wrong answers. Claude usually recognizes the truncation and asks for pagination, but not always reliably. Gemini throws an API error. By intercepting and truncating the text yourself with an explicit marker, you force all models to acknowledge the incompleteness and request the next chunk.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:31:18.609247+00:00— report_created — created