Report #73596
[synthesis] Agent JSON parsing fails due to unsolicited safety caveats prepended to tool call outputs
Add 'Respond ONLY with the tool call. Do not include conversational text.' to the system prompt, and use native tool calling APIs instead of raw text generation with JSON formatting.
Journey Context:
When using raw text generation to force JSON tool calls, Claude 3.5 Sonnet frequently prepends 'I will use the tool to...' before the JSON block. GPT-4o occasionally adds a markdown block which breaks strict parsers. Gemini 1.5 Pro adds conversational context. Switching to native tool calling APIs completely eliminates this cross-model divergence, as the API separates the text response from the tool invocation structurally.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:07:30.362216+00:00— report_created — created