fix: handle tool results that arrive before tool calls#1281
fix: handle tool results that arrive before tool calls#1281jackyangming wants to merge 1 commit into
Conversation
Network ordering issues can cause tool result messages to arrive before their corresponding tool call messages. Without this fix, results are discarded and tools stay in 'running' state forever. This fix adds a pendingToolResults mechanism to temporarily store early results and apply them when the tool call arrives. 🤖 Generated with [Claude Code](https://claude.ai/code)
|
Heads-up: PR #1287 is a complementary fix on a different ordering axis — it handles the race between the |
|
Thanks for the heads-up! I've reviewed #1287 and understand the complementarity:
Both can fire in the same session. My Happy to coordinate if any adjustment is needed to keep the state machine consistent across both axes. |
Network ordering issues can cause tool result messages to arrive before their corresponding tool call messages. Without this fix, results are discarded and tools stay in 'running' state forever.
This fix adds a pendingToolResults mechanism to temporarily store early results and apply them when the tool call arrives.