Report #80757
[synthesis] Agent parser breaks on conversational text before tool call JSON
Implement a pre-processing step to strip non-JSON text or use native tool-calling APIs instead of raw completion endpoints; explicitly instruct Claude models with 'Output ONLY the tool call JSON, no conversational text'.
Journey Context:
GPT-4o natively emits tool calls without conversational filler when using the tool-calling API. Claude 3.5 Sonnet frequently prepends conversational filler \(e.g., 'I will look that up for you.'\) when using raw completion endpoints or if system prompts are loosely defined. Developers assume all models act like GPT-4o in strict mode, leading to JSON parsing failures on Claude outputs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T18:09:02.339041+00:00— report_created — created