Report #36480
[synthesis] Agent skips critical reasoning steps or hallucinates variables after a successful external API call
Implement runtime JSON schema validation \(e.g., using jsonschema or zod\) on all tool outputs immediately after execution, before passing the result back into the LLM context. Alert on schema deviations, not just HTTP errors.
Journey Context:
Standard monitoring tracks tool execution success rates \(HTTP 2xx\). However, when an external API silently adds a new nested object or changes a field from string to null, the tool call 'succeeds' but the LLM receives unexpected data. Because LLMs are probabilistic, they don't throw a parsing error; they just confidently skip the missing variable or hallucinate its value based on prior training data. Checking only HTTP status codes gives a false sense of health; strict contract testing at the agent boundary is required.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:42:27.025645+00:00— report_created — created