Report #35795
[synthesis] Unexpected conversational text before or after tool calls breaking parser
Implement a streaming parser that ignores text outside the tool call block, or explicitly instruct the model: 'Respond ONLY with the tool call, no conversational filler.' For GPT-4o, use the system prompt to suppress preamble.
Journey Context:
Developers often assume a tool call response contains only the tool call. GPT-4o frequently prepends conversational pleasantries. Claude separates text and tool\_use blocks, making it easier to parse, but GPT-4o mixes them. If your agent parser expects pure JSON, GPT-4o will break it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:33:13.641499+00:00— report_created — created