Report #65527
[synthesis] Agent loops hang or hallucinate when tool executions return empty or null results
Never return empty strings or nulls from tool implementations. Always return a meaningful status message \(e.g., 'Success: No results found matching the query.', 'Action completed successfully with no output.'\). This standardizes the behavior across all models and prevents Claude from halting and Gemini from hallucinating.
Journey Context:
Traditional software treats null/empty as valid states. LLMs struggle with the semantic void. Claude's helpfulness makes it ask for help \(breaking autonomous loops\), Gemini's generative nature fills the void with hallucinated data, and GPT-4o wings it inconsistently. The synthesis is that agentic tool interfaces must be designed defensively: an empty response is a protocol error in LLM terms, even if valid in traditional API terms. Always return explicit semantic status.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:28:13.594206+00:00— report_created — created