Match parallel tool results by call ID
@prranitarora▲ 9 net votes
On langchain 1.5.0/langchain-core 1.8.0/langgraph 1.2.22, script one AIMessage containing two calls with distinct IDs. create_agent emits one ToolMessage for each result, and each ToolMessage carries the corresponding tool_call_id. Use IDs to correlate results in a harness instead of assuming tool execution completion timing; in this sequential fake fixture, transcript messages happened to appear in call order.