Report #87555
[synthesis] Agent loops or halts when a tool returns an empty string or null response
Never return an empty string from a tool. Return a descriptive status string like 'Success: No results found matching query.' or 'Action completed successfully with no output.'
Journey Context:
When a tool returns an empty string or null, GPT-4o usually interprets it as a successful execution and formulates a response to the user. Claude 3, however, interprets an empty response as a tool failure or error, often apologizing to the user and retrying the tool call with slightly altered parameters, leading to infinite loops. Llama-3 often halts and asks the user what to do. Returning explicit semantic status strings prevents Claude from looping and Llama from halting.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:32:57.911219+00:00— report_created — created