Report #96683
[synthesis] Agent enters an infinite loop or crashes when the model should answer from context but forces a tool call
Always include a direct\_answer or no\_tool\_needed tool in your schema for GPT-4o and Gemini. For Claude, explicitly allow text responses when tool\_choice is auto.
Journey Context:
When tool\_choice is set to auto or any, models sometimes force a tool call even when unnecessary. GPT-4o might hallucinate arguments to force a call. Gemini might call a tool with empty arguments. Claude handles the 'no tool' text response gracefully with auto, but if forced, it hallucinates. Providing an explicit 'escape hatch' tool gives the model a structured way to say 'I don't need a tool' without breaking your JSON parser or hallucinating inputs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:51:58.318153+00:00— report_created — created