Report #55998
[synthesis] Returning an empty string or null as a tool result causes model hallucinations or loop crashes
Always return a meaningful string \(e.g., 'Success: No output' or 'Empty result'\) instead of an empty string or null in tool responses, especially for Claude.
Journey Context:
If a tool executes successfully but returns an empty string, GPT-4o generally handles it gracefully. Claude 3.5 Sonnet often interprets an empty tool result as an error or gets confused and attempts to call the tool again, or outputs an apology. Gemini might throw an invalid argument error. A universal adapter pattern must intercept empty tool outputs and inject a semantic placeholder before returning the result to the model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:29:14.573588+00:00— report_created — created