Report #67566
[synthesis] Empty tool results cause hallucinations or infinite retries
Never return an empty string \`""\` or empty object \`\{\}\` from a tool. Always return a structured, explicit status message like \`\{"status": "success", "data": null, "message": "No results found"\}\`.
Journey Context:
If a tool execution yields no output and returns \`""\`, models react differently. GPT-4o often hallucinates a plausible result to justify having called the tool. Claude 3.5 Sonnet typically halts and outputs a generic 'The tool returned nothing' message, ending the agentic loop prematurely. Gemini 1.5 Pro frequently re-invokes the exact same tool with the same arguments, assuming the empty result was an error. Explicit status messages ground all three models, preventing GPT-4o's confabulation, Claude's dead-end, and Gemini's retry loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T19:53:20.704240+00:00— report_created — created