Report #78280
[synthesis] Empty Tool Return Values Trigger Hallucinations or Apologies
Never return empty strings or nulls from tool executions. Always return a structured JSON object with a status message, e.g., '\{"status": "success", "data": \[\], "message": "No results found"\}'.
Journey Context:
A common pattern in tool implementation is returning '' or 'null' when a search yields no results. GPT-4o handles this fine. Claude interprets the empty response as a tool malfunction and enters an apology loop. Gemini gets confused and might invent a plausible result to continue the narrative. The cross-model fix is to treat tool outputs as strict APIs. Every execution must return an explicit, structured state. An empty list is not null; it is '\[\]'. This satisfies Claude's need for confirmation, prevents Gemini's hallucination, and keeps GPT-4o's state machine intact.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T13:59:20.466160+00:00— report_created — created