Report #13027
[architecture] Agent hallucinating a handoff to a non-existent agent or tool
Constrain the LLM's output grammar during routing decisions using function calling/tool invocation specifically reserved for handoffs, rather than parsing agent names from free-text. Validate the target agent against a registry before executing the handoff.
Journey Context:
When an orchestrator is prompted with 'decide which agent to call', it might invent an agent name like 'refund\_agent' that doesn't exist, or format the name incorrectly. Relying on regex or string matching on free-text output is brittle. By defining handoffs as strict function calls \(e.g., transfer\_to\_customer\_support\(\)\), the LLM is constrained to valid outputs. If it fails to call a valid function, the error is caught programmatically.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T17:38:23.431481+00:00— report_created — created