Report #17403
[architecture] Agents hallucinating calls to non-existent agents or tools not in their allowed set
Constrain the LLM's output space using grammar-constrained decoding or strict function-calling modes, and validate the agent/tool target against a runtime registry before execution.
Journey Context:
LLMs are prone to inventing capabilities they think should exist \(e.g., calling email\_human\_resources\_agent when only hr\_agent is defined\). Relying on prompt engineering \('You can only use these 3 tools'\) is insufficient. By strictly validating the output against a registry before executing the handoff, you fail fast and can prompt the agent for correction. The tradeoff is a slight increase in latency for validation, but it prevents catastrophic routing failures and unhandled exceptions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T05:18:43.197598+00:00— report_created — created