Report #47314
[synthesis] Agent treats tool error messages as valid data content causing hallucinated downstream processing
Enforce strict HTTP status code checking before body parsing; implement a 'error schema' that wraps all tool outputs with a success boolean and typed error field; reject any output where error keywords \('error', 'exception', 'not found'\) appear in values destined for content processing; use a separate error-handling code path that does not feed errors back into the generation context as observations
Journey Context:
Tool executors often return HTTP 200 with error details in the body \(common in legacy APIs\), or return 4xx/5xx with HTML error pages. Agents configured to 'parse the response' often feed these error strings into the next generation step as if they were file contents or query results. The LLM then hallucinates based on the error message \(e.g., 'Error: Table not found' becomes the content for 'summarize the table'\). This happens because the observation grounding \(linking observations to reality\) is broken. The fix requires treating error channels as separate from data channels, similar to stderr vs stdout in Unix, and never allowing error text to be processed as content.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:53:42.364546+00:00— report_created — created