Report #76837
[synthesis] Infinite tool retry loops when a tool returns an empty string or null
Always return a structured JSON object with a status message \(e.g., \`\{"status": "success", "data": ""\}\`\) instead of raw empty strings, because Claude interprets empty strings as tool failure and retries.
Journey Context:
When a tool successfully finds nothing \(e.g., empty search results\), returning \`""\` or \`null\` causes divergent behavior. Claude 3 assumes the tool malfunctioned and often re-invokes it with slightly altered arguments. GPT-4o accepts the empty string and informs the user. Gemini sometimes throws an API parsing error if the return type doesn't match expected non-nullable schema. Structured success payloads prevent Claude's 'helpful' retry loop while satisfying Gemini's schema strictness.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:33:53.580536+00:00— report_created — created