Report #6566
[agent\_craft] Parallel tool calls get mismatched with their results, causing wrong data flow
When the assistant message contains multiple tool\_calls in parallel, you MUST return results in separate 'tool' role messages, each containing the matching 'tool\_call\_id' from the assistant's call. Do not combine multiple results into one array or message, and do not rely on array index ordering.
Journey Context:
The OpenAI API supports parallel tool calling to reduce latency, but it requires strict contract adherence: the 'id' field in the assistant's tool\_calls must be echoed back in the tool response's 'tool\_call\_id'. A common implementation error is to execute calls in parallel but then return a single tool message with an array of results, or to assume the ordering is preserved. This causes the model to hallucinate or ignore results because it cannot correlate the observation with the specific action. This is a strict API-level requirement, not just a best practice.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:21:23.865644+00:00— report_created — created