Report #74031
[synthesis] Agent hallucinates the missing parts of a truncated tool output
Implement a 'token budget' for tool outputs and a pagination/chunking strategy. If a tool output is truncated, the agent must explicitly acknowledge the truncation and request the next chunk, rather than assuming the output is complete.
Journey Context:
When a tool \(like reading a large file or querying a large DB\) returns too many tokens, the agent framework often truncates it with a '... \[truncated\]' message. The LLM, seeing what looks like a complete response, will often just proceed with the partial information, filling in the gaps with hallucinations. The fix is to make truncation a first-class concept in the agent's state: the tool must return a has\_more flag, and the agent's prompt must explicitly instruct it to check this flag and fetch more data if needed, rather than guessing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:51:31.916316+00:00— report_created — created