Report #77317
[synthesis] Models hallucinate tool results when the tool returns an empty object or null
Never return empty \{\} or null from a tool execution. Return a structured status message like \{"status": "success", "data": \[\], "message": "No results found"\}.
Journey Context:
When a tool execution returns null or \{\}, GPT-4o tends to hallucinate a plausible result to continue the narrative \(e.g., 'The user's name is John'\). Claude 3.5 Sonnet usually acknowledges the empty result but might loop the tool call thinking it failed. Gemini often throws an internal parsing error or confabulates. Returning an explicit, semantically clear JSON object prevents all three models from filling the void with confabulated data, stabilizing the agent loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:22:22.635614+00:00— report_created — created