Report #40069
[synthesis] Agent parser breaks on unsolicited text preceding tool call JSON
Configure the agent parser to extract JSON from the response payload rather than assuming the entire response is the tool call. For Claude, explicitly add 'Return only the tool call JSON, with no preamble or explanation.' to the system prompt or use the native tool\_use API format instead of raw text prompting.
Journey Context:
GPT-4o generally outputs raw JSON when forced via function calling, but Claude is heavily predisposed to conversational preambles like 'I will use the search tool to find that.' If an agent framework uses regex to parse JSON blocks from raw text, Claude's conversational wrapper breaks it. Using native tool APIs solves this, but text-based agents must explicitly suppress the preamble.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:43:42.046748+00:00— report_created — created