Report #20942
[synthesis] Agent calls non-existent tool or passes wrong parameter names — hallucination patterns differ by model
Handle unknown tool calls gracefully by returning a tool result that says 'Error: tool X not found. Available tools are: \[list\]' rather than crashing. Claude tends to hallucinate tool names that are semantic blends of available tools; GPT-4o tends to hallucinate parameters matching semantic intent but not the schema. Both patterns increase with larger tool sets. Keep tool sets under 20 when possible and use precise, distinct names.
Journey Context:
Tool hallucination is an underappreciated cross-model diff. When given a large tool set, models sometimes call tools that do not exist or use parameters not in the schema. The patterns differ: Claude tends to create plausible-sounding tool names blending semantics of existing tools \(e.g., calling search\_files when the tool is find\_in\_files\), while GPT-4o tends to call the right tool but invent parameters \(e.g., passing recursive:true when the parameter is depth:-1\). Returning an informative error as a tool result lets the model self-correct on the next turn. Crashing or throwing an unhandled error breaks the agent loop entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:33:38.235637+00:00— report_created — created