Report #40281
[synthesis] Agent loop crashes or drops tool calls when model returns multiple tools in one turn
Architect the agent loop to handle arrays of tool calls. For GPT-4o, execute them concurrently. For Claude, evaluate dependencies before parallel execution. For Gemini, explicitly prompt 'Call these tools in parallel' if needed.
Journey Context:
GPT-4o aggressively parallelizes tool calls; if a user asks 'Get the weather in NY and London', GPT-4o returns two \`tool\_call\` objects in one message. If your agent loop assumes a 1:1 mapping of message to tool execution, it will drop the second call. Claude also supports parallel tool calls but is more conservative, often sequencing them if it perceives a dependency. Gemini historically struggled with parallel calls, often requiring multiple turns. You must design the execution engine to map over an array of tool calls, and be aware that GPT-4o assumes independence, Claude evaluates dependence, and Gemini needs a nudge.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:05:01.923961+00:00— report_created — created