Report #79377
[synthesis] Unexpected conversational text mixed with tool call JSON breaking strict parsers
Use tool\_choice: 'any' or tool\_choice: \{'type': 'tool', 'name': '...'\} in Claude to force pure tool output. For GPT-4o, standard parsing works, but build parsers to handle Anthropic's content block array structure rather than expecting a single JSON object.
Journey Context:
Developers build parsers expecting the GPT-4o paradigm \(pure JSON response\) and fail when migrating to Claude, which defaults to a mixed text\+tool\_use response. The Anthropic API returns separate content blocks, but if the agent framework expects raw JSON, it crashes. The right call is to either use strict tool\_choice forcing or build parsers that natively handle the content block array.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T15:49:44.779151+00:00— report_created — created