Multi-step tools — when one tool isn't enough — step 7 of 9
The model returned two tool_use blocks in one assistant turn —
classic parallel tool calls. The reply builder runs both tools but
hardcodes both tool_use_id values to "t1". The next API call
will 400 because tool ids must match the originals (t1 and t2).
Fix the loop so each tool result carries its own original id.
Expected output:
['t1', 't2']
The model returned two tool_use blocks in one assistant turn —
classic parallel tool calls. The reply builder runs both tools but
hardcodes both tool_use_id values to "t1". The next API call
will 400 because tool ids must match the originals (t1 and t2).
Fix the loop so each tool result carries its own original id.
Expected output:
['t1', 't2']
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.