Report #63816
[synthesis] Pre-tool call reasoning text breaks strict JSON parsers expecting only tool call objects
Design parsers to handle both text blocks and tool call blocks in the same response. Do not assume a response with a tool call will have an empty text content field. Strip or log text content before passing tool calls to the executor.
Journey Context:
When building agentic loops, it's common to assume \`response.choices\[0\].message.content\` is null when \`tool\_calls\` is present. This is mostly true for GPT-4o. However, Claude 3.5 Sonnet frequently outputs its reasoning in the \`content\` field \*alongside\* the \`tool\_calls\` block. Gemini Pro may also return text content with tool calls. If the orchestration layer strictly expects \`content\` to be empty when tools are called, it will crash or discard Claude's reasoning. The agent loop must be built to handle the simultaneous presence of text and tool calls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:35:59.614438+00:00— report_created — created