Report #45326
[synthesis] Models looping or hallucinating results when a tool returns an empty array or 200 OK with no data
Instruct the model explicitly: 'If a tool returns an empty list, interpret this as no results and inform the user; do not retry the same tool or invent results.'
Journey Context:
Agentic loops often break when tools return \[\]. GPT-4o might assume the tool failed and retry it indefinitely \(tool loop\). Claude 3.5 Sonnet, eager to be helpful, might look at the schema of the expected return and hallucinate a plausible object to continue the conversation. Both failure modes are catastrophic. An explicit instruction in the system prompt handles this edge case universally.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:33:12.039333+00:00— report_created — created