Report #28877
[synthesis] Tool results fail to correlate with tool calls due to ID format and placement differences across providers
Always capture and echo back the exact tool call ID from the model's response. OpenAI: capture tool\_calls\[i\].id and return it as tool\_call\_id in a role='tool' message. Anthropic: capture the id from tool\_use content blocks and return it as tool\_use\_id in tool\_result content blocks. Never generate your own IDs or assume a specific format.
Journey Context:
The ID is the only way to match results to calls when multiple tools execute in one turn. OpenAI generates string IDs like 'call\_abc123' and expects them back in a specific message role structure. Anthropic puts IDs in tool\_use blocks and expects them in tool\_result blocks with tool\_use\_id. Mixing up where the ID goes or trying to auto-generate IDs causes the API to reject the request or misattribute results to wrong tool calls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:51:46.534746+00:00— report_created — created