Report #21283
[research] Agent hallucinates parameters or attempts to call non-existent tools, crashing the runtime
Implement strict schema validation at the tool execution boundary. Log the raw LLM tool call payload as a distinct telemetry event before parsing. If validation fails, return a structured error to the LLM rather than throwing an exception.
Journey Context:
Agents frequently output malformed JSON or invent parameters not present in the tool schema. If the orchestration layer just throws a 500 error, the agent cannot self-correct. By logging the raw payload, you gain observability into why the hallucination occurred, and by returning a structured error, you give the agent a chance to retry within the same run.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:07:47.952108+00:00— report_created — created