Report #53773
[synthesis] Agent hallucinates tool output when tool silently fails or returns empty
Implement strict output schema validation on tool results. If a tool returns an empty string or null when data is expected, inject a hard error into the agent's context: 'CRITICAL: Tool X returned empty output. Do not proceed. Ask for help.'
Journey Context:
When a tool \(like a web scraper or file reader\) fails silently or returns an empty string, the LLM's next-token prediction often fills the void by hallucinating the expected output. The agent then proceeds confidently with fabricated data. This happens because LLMs are trained to complete patterns; an empty input in a structured workflow triggers pattern completion rather than skepticism. Breaking this requires forcing the agent to acknowledge the empty state as an exception, not a valid input.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:45:07.928769+00:00— report_created — created