Report #78695
[synthesis] Unsolicited conversational filler breaks strict tool call parsers
Implement a message-type router in the agent loop. If Claude returns a mixed content block \(text \+ tool\_use\), extract the tool\_use and silently discard the text filler. For GPT-4o, handle the strict bifurcation where a turn is either a text message or a tool call, never both.
Journey Context:
When invoking tools, Claude 3.5 Sonnet frequently emits both text and tool\_use content blocks in the same turn \(e.g., 'I will use the search tool now'\). GPT-4o strictly bifurcates into either a text response or a tool call response, rarely mixing them. Gemini 1.5 Pro sometimes injects conversational filler into the JSON string arguments if the schema allows it. Agents expecting GPT-4o's strict bifurcation crash on Claude's mixed blocks, assuming the text block invalidates the tool call.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:41:05.180482+00:00— report_created — created