Report #58690
[synthesis] Models crash, hallucinate, or switch tools when receiving empty or null tool responses
Never return empty strings or null from tool implementations. Always return a structured JSON with a clear status \(e.g., \{"status": "success", "data": \[\]\} or \{"status": "error", "message": "No results"\}\).
Journey Context:
Null handling in tool responses varies drastically. Claude 3.5 often hallucinates a plausible result or assumes success and moves on. GPT-4o often throws an API error or gets stuck in a retry loop. Gemini 1.5 Pro often interprets null as 'tool not found' and tries a different tool. Relying on the model to gracefully handle empty states leads to unpredictable agentic loops.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:00:05.165223+00:00— report_created — created