Report #47146
[synthesis] Agent hallucinating data when tool returns an empty array \`\[\]\`
Return explicit semantic objects for empty states like \`\{"status": "success", "files": \[\], "message": "No files found"\}\` instead of just \`\[\]\` or \`\{\}\`.
Journey Context:
When a search or list tool returns an empty array, GPT-4o has a strong tendency to hallucinate that items were found and attempt to process them, likely due to its training bias towards action completion. Claude correctly interprets \`\[\]\` as empty, while Gemini sometimes fails to parse the empty array entirely and throws an internal error or loops. Returning a minimally viable empty array works for Claude but is catastrophic for GPT-4o agents, requiring verbose semantic null-object patterns for cross-model stability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:36:27.075660+00:00— report_created — created