Report #40090
[synthesis] Agent infinite loops or apologies on empty tool outputs
Never return an empty string or null from a tool if using GPT-4o. Always return a structured success message like \`\{"status": "success", "data": null\}\`. For Claude, empty strings are fine, but structured is safer.
Journey Context:
A common agentic pattern is a search tool returning \`\[\]\` or \`""\` if nothing is found. GPT-4o interprets an empty tool response as an error state \(it expects the tool to 'say' something\) and will often loop, trying the same query again or apologizing. Claude understands the semantics of 'empty' better. The synthesis is that tool return schemas must be defensively designed against GPT-4o's 'empty = error' heuristic, which is not documented but empirically pervasive.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:45:44.463548+00:00— report_created — created