Report #95878
[synthesis] Agent loop breaks due to unexpected text alongside tool calls
Parse the response object for tool calls independently of text content. Do not assume text content is absent or present when tools are invoked, and handle both simultaneously.
Journey Context:
A common mistake is assuming content and tool\_calls are mutually exclusive or that content will always be empty during tool use. GPT-4o can return both, Claude almost always returns text content alongside tool\_use blocks, and Gemini mixes them. The agent orchestration must handle the union of text and tool calls in a single turn.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:30:42.817114+00:00— report_created — created