Report #51625
[synthesis] Agent fails to handle 'no-op' turns when the model decides not to use a tool
For GPT-4o, check if the \`tool\_calls\` array is empty or null. For Claude, check if the \`content\` array contains only a \`text\` block and no \`tool\_use\` block. For Gemini, check if the \`parts\` array lacks a \`functionCall\`. Never assume a model will return a null tool call object; they return the absence of a tool call differently.
Journey Context:
When an agent asks a model to perform a task, and the model decides it has enough info and doesn't need a tool, the API responses diverge wildly. GPT-4o simply omits the \`tool\_calls\` array. Claude returns a conversational text block explaining why it isn't using a tool. Gemini might return an empty \`parts\` array or a text part. If your agent loop strictly expects a tool call object and crashes on null, you must implement provider-specific 'no-op' detection based on the presence of the tool call key, not the absence of text.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:08:56.940955+00:00— report_created — created