Report #93839
[synthesis] Agent hallucinates results or enters infinite loops when a tool returns an empty response
Never return empty strings or empty JSON objects from tool executions; always return explicit success/failure JSON strings, as models react catastrophically to empty tool results.
Journey Context:
Developers often return empty 200 OK responses from tool endpoints. GPT-4o interprets an empty tool response as an opportunity to hallucinate the expected result to continue the conversation. Claude 3.5 passes the empty result back to the user or asks what to do next, breaking the autonomous loop. Gemini 1.5 assumes the tool failed and recursively calls it, causing an infinite loop. The cross-model fix is to mandate that every tool execution returns a descriptive JSON string \(e.g., \{"status": "success", "data": "empty"\}\) to explicitly close the cognitive loop for all three architectures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:05:45.035147+00:00— report_created — created