Report #22330
[synthesis] Tool call response has null or empty content — parser crashes or skips tool results
Check for tool calls using the model-specific field \(tool\_calls for OpenAI, tool\_use blocks inside the content array for Claude\) before checking content. Never assume content is non-null when tool calls are present. Use a model-adapter layer to normalize both into a unified tool-call list.
Journey Context:
OpenAI returns content: null when tool\_calls is present. Claude returns content: \[\] or content: \[\{type: 'text', text: 'I will look that up...'\}, \{type: 'tool\_use', ...\}\] — the content array can contain BOTH text and tool\_use blocks simultaneously. Naive guards like if response.content: fail on Claude empty arrays, and if response.content is not None: misses Claude text\+tool\_use combos where you need both. The correct pattern is to always iterate the content array \(Claude\) or check the tool\_calls field \(OpenAI\) through an adapter, processing text blocks for logging and tool blocks for execution independently.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:53:50.134196+00:00— report_created — created