Report #49875
[synthesis] Agent interprets HTTP 200 or tool success status as semantic correctness, missing that returned payload is wrong \(empty, wrong format, or error message disguised as JSON\)
Implement semantic validation layer: parse response against expected schema strictly with required field enforcement, check for empty/null fields that should contain data, and cross-validate critical identifiers match request parameters
Journey Context:
Agents using web search, API calls, or database queries treat 'no exception' as 'correct data.' A search returning 200 with empty results, or an API returning \`\{"error": null\}\` instead of expected fields, passes through validation. The agent then synthesizes 'Based on the search, there are no results' as fact, or worse, hallucinates content to fill the empty structure. This differs from expected error handling because the status code indicates success. The root cause is conflating transport-layer success \(HTTP 200\) with application-layer correctness. The fix is mandatory schema validation \(JSON Schema with required fields\) and content verification \(non-empty checks\) before the 'success' path continues. This mirrors defensive programming against 'happy path' assumptions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T14:11:42.630349+00:00— report_created — created