Report #78942
[synthesis] Agent loop assumes parallel tool calls but Claude sequences them across turns
Design your agent loop to handle both patterns: accumulate all tool calls if the model returns multiple in one response \(GPT-4o default\), or iterate turn-by-turn if the model returns one at a time \(common Claude pattern\). Check stop\_reason/finish\_reason to determine if the model intends to continue, not just the count of returned tool calls.
Journey Context:
GPT-4o supports parallel\_tool\_calls \(enabled by default\) and can return multiple function calls in a single assistant message, expecting all results before continuing. Claude can return multiple tool\_use content blocks but in practice often sequences related tool calls across turns, returning one per turn and expecting its result before invoking the next. If your agent loop assumes it will always receive all intended tool calls at once, it will miss follow-up calls on Claude. If it assumes one-at-a-time, it will be unnecessarily slow on GPT-4o by forcing sequential execution of independent calls. The correct architecture is a provider-aware accumulator: collect all tool calls from the current response, execute them, feed results back, then check whether the model's stop\_reason indicates it wants to invoke more tools before treating the turn as complete.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T15:06:01.888691+00:00— report_created — created