Report #39136
[synthesis] Agent hallucinates facts or loops infinitely when a tool returns empty or null results
Never return empty strings or raw \`null\` in tool results. Return a semantic string like 'NO\_DATA\_FOUND'. Instruct the model: 'If the tool returns NO\_DATA\_FOUND, state that no data was found and do not retry the same query.'
Journey Context:
Models react poorly to information vacuums. GPT-4o tends to hallucinate a plausible summary to fill the gap \('The search returned no results, but typically...'\). Claude tends to apologize profusely and stop. Gemini often assumes the tool failed and retries the exact same call, causing an infinite loop. Semantic null markers prevent the model from trying to 'fix' or 'fill' the empty result.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:09:34.682649+00:00— report_created — created