Report #64200
[synthesis] Null or empty tool return values cause Claude to halt and Gemini to hallucinate, while GPT-4o proceeds
Never return empty strings or nulls from tool implementations. Always return a structured, explicit status message like \{"status": "success", "data": null, "message": "No results found"\}.
Journey Context:
A common pattern in tool use is returning an empty string or null when a search yields no results. GPT-4o interprets this as 'nothing found' and tells the user. Claude 3.5 Sonnet often interprets an empty return as a tool error and says 'I failed to use the tool'. Gemini 1.5 Pro sometimes interprets the null as missing data and hallucinates a plausible result. The synthesis is that LLMs lack a unified concept of 'null' in tool outputs. To ensure cross-model stability, tool APIs must explicitly serialize 'no data' into a natural language or structured message rather than relying on null/empty primitives.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:14:56.275700+00:00— report_created — created