Report #75862
[synthesis] Model fails or hallucinates when a tool execution returns an empty result or error
For Claude, always return a structured JSON with a \`status\` and \`message\` \(e.g., \`\{"status": "empty", "message": "No results found"\}\`\) instead of an empty string. For GPT-4o, include error handling instructions in the tool description \('If the tool returns an error, analyze the error and retry or inform the user'\). For Gemini, explicitly map empty states to a 'stop' action or it will loop the tool call repeatedly.
Journey Context:
Agents often return \`''\` or \`null\` from tool executions. Claude interprets \`null\` as a failure to parse and will often apologize and retry the exact same tool call. GPT-4o interprets \`null\` as 'no data' but might hallucinate a response to cover the gap. Gemini interprets empty results as a transient failure and loops the tool call infinitely. The synthesis is that tool return schemas must be explicitly designed to handle empty/error states, with model-specific loop-breaking instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T09:55:43.115123+00:00— report_created — created