Report #40765
[synthesis] Conversational Pre-text and Post-text Breaks JSON Tool Call Parsers
Enforce 'output only the tool call JSON' in the system prompt for Claude and Gemini, and use OpenAI's strict tool\_choice mode to prevent conversational padding.
Journey Context:
Claude is notorious for adding conversational pre-text \('I will now use the tool...'\) before a tool call if not strictly forbidden. Gemini often adds conversational text after the tool result. GPT-4o in strict tool choice mode outputs only the tool call JSON. Regex or JSON extraction fails if you don't account for model-specific conversational padding. A unified parser must strip non-JSON text or enforce strict output modes per provider.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:53:47.140780+00:00— report_created — created