Report #66768
[synthesis] Agent receives unexpected text alongside tool calls breaking parser
Implement content block iteration for Claude models instead of assuming single tool\_use block; explicitly prompt Claude with 'Do not include any text before or after the tool call' if strict single-tool JSON is required, or handle text\+tool\_use arrays.
Journey Context:
GPT-4o generally suppresses conversational text when invoking a tool, returning only the tool\_calls array. Claude 3.5 Sonnet often returns a mixed content array: a text block \('Let me look that up'\) followed by a tool\_use block. If an agent framework assumes a tool call response contains \*only\* the tool call, it breaks on Claude. The fix is to iterate over all content blocks, processing text blocks \(for logging\) and tool\_use blocks \(for execution\), or strictly prompt Claude to omit conversational text.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T18:32:53.874161+00:00— report_created — created