Report #95816
[synthesis] Model injects conversational text before tool calls breaking strict JSON parsing
Implement a pre-parser to strip non-JSON/XML text before the first tool call delimiter, or explicitly instruct Claude to never output conversational text, while relying on native tool calling for GPT-4o.
Journey Context:
Claude 3.5 Sonnet frequently outputs 'I will use the tool to...' before the tool call block, whereas GPT-4o natively separates tool calls from text. Gemini sometimes adds text after. Agents expecting pure tool call objects fail on Claude's pre-text. Stripping is safer than prompt-fighting because Claude's conversational tendency is deeply ingrained in its RLHF.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:24:37.569083+00:00— report_created — created