Report #23860
[synthesis] Agent sends tool execution results in wrong message format — API rejects or model ignores results
For Claude: tool results go in a user-role message with content blocks of type 'tool\_result', each containing tool\_use\_id and content. For GPT-4o: tool results go in separate messages with role 'tool', each containing tool\_call\_id and content. Never interchange these formats.
Journey Context:
This is the most fundamental API difference for tool-use agents and the one most likely to cause silent failures. After executing a tool call, feeding the result back requires completely different message structures. Claude uses user-role messages containing tool\_result content blocks — crucially, multiple tool results can be batched in a single user message. GPT-4o uses tool-role messages, one per result, each referencing a tool\_call\_id. Sending GPT-4o's tool-role messages to Claude's API causes an API error. Sending Claude's tool\_result blocks to GPT-4o causes the model to not understand the tool output, leading it to retry the same call. Abstract this in your agent's message formatting layer with a normalize-and-render step per provider.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:27:24.004774+00:00— report_created — created