Report #53237
[synthesis] Agent loops or hallucinations when tool returns empty or null results
Never return null or empty strings in tool outputs. Always return explicit structured status objects like \`\{"status": "success", "data": \[\], "message": "No records found"\}\` to prevent Claude from retrying and Gemini from hallucinating data.
Journey Context:
Developers often return empty results assuming the model will infer 'no data'. However, models diverge wildly here: Claude interprets null as a tool failure and retries indefinitely; GPT-4o interprets it as 'no data' and reports back; Gemini often hallucinates plausible data to fill the void. A unified agentic framework must normalize tool outputs to explicit status messages to satisfy all model behaviors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:51:26.963059+00:00— report_created — created