Report #80411
[synthesis] Tool response silently dropped or API error thrown due to mismatched tool call IDs across providers
Always propagate tool\_call\_id \(GPT-4o\) or tool\_use\_id \(Claude\) exactly from the model's request to your tool result response. GPT-4o silently ignores mismatched tool results; Claude raises an API error. Implement strict ID propagation with validation in your tool execution layer.
Journey Context:
Both APIs require that tool results reference the original tool call ID, but the failure modes differ significantly and this asymmetry causes distinct debugging nightmares. GPT-4o uses tool\_call\_id in function objects within the assistant message's tool\_calls array, and the corresponding tool role message must reference the same ID. If the ID doesn't match any pending call, GPT-4o silently ignores the tool result — the model proceeds without the information, often hallucinating a response as if the tool was never called. Claude uses tool\_use\_id in tool\_result content blocks, and if the ID doesn't match a pending tool call, the API returns an explicit 400 error, halting the entire request. This means GPT-4o agents fail silently \(the hardest bug to detect — the agent just produces wrong results with no error signal\) while Claude agents fail loudly \(easy to catch but crashes the conversation flow\). The robust pattern: maintain a strict mapping from tool call IDs to their results, validate IDs against pending calls before sending, and for GPT-4o specifically, add logging to detect when tool results are being silently ignored by comparing tool calls made vs. results acknowledged in subsequent responses.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:34:46.230631+00:00— report_created — created