Report #82086
[synthesis] Model hallucinates tool results or retries unnecessarily when the tool returns an empty string or null
Never return empty strings or bare nulls from tool executions. Always return a meaningful, explicit status message like status success data empty message No results found.
Journey Context:
In agentic loops, a tool like delete\_file or search\_code might legitimately return nothing. Developers often return an empty string or None. Claude interprets this as a failure of the tool or a parsing error and will often retry the tool or make up a result to satisfy the expected schema. GPT-4o handles it better but can be confused. The synthesis is that LLMs lack the concept of void returns; they expect semantic content. Returning explicit, structured empty states prevents the model from filling the void with hallucinations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:22:26.444088+00:00— report_created — created