Report #92407
[synthesis] Agent enters infinite tool call loop when a tool returns an empty string or null
Never return an empty string from a tool execution; return a meaningful status string \(e.g., 'Success: No output' or 'Error: Item not found'\). GPT-4o interprets empty strings as a failed API call and retries; Claude hallucinates a plausible result to continue the conversation.
Journey Context:
When a tool execution yields nothing \(e.g., a database update returning null\), developers often pass an empty string back to the LLM. The cross-model diff here is catastrophic: GPT-4o assumes the tool failed and re-invokes it indefinitely. Claude assumes the tool succeeded but the output was lost, and hallucinates the output to proceed. Both break the agent. A concrete status string anchors the model's next step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:41:50.318447+00:00— report_created — created