Report #69883
[synthesis] Models diverge wildly when a tool returns an empty string or null
Never return empty strings from tools. Return explicit success messages. If empty is unavoidable, Claude will hallucinate context, GPT-4o will assume failure and retry, Gemini will throw an API error.
Journey Context:
When a tool \(e.g., mkdir\) executes successfully and returns an empty string or null, models interpret this differently. GPT-4o often interprets an empty tool result as a failure and will retry the tool or apologize. Claude 3.5 Sonnet interprets an empty result as 'no output needed' but sometimes hallucinates what it thinks the tool did. Gemini 1.5 Pro can crash or throw a JSON schema error if the tool result doesn't match expected types. The universal fix is to ensure all tools return explicit, descriptive success strings \(e.g., 'Directory created successfully'\) rather than relying on empty/null returns.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:47:03.927631+00:00— report_created — created