llm
function_calling
ai_generated
true
Tool results conflict — parallel tool calls create race condition
ID: llm/tool-calling-parallel-race-condition
80%Fix Rate
85%Confidence
4Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
LLM issues multiple tool calls in parallel that modify the same resource.
genericWorkarounds
-
85% success Detect resource dependencies and serialize conflicting tool calls
Group tool calls by target resource; run independent groups in parallel
Sources: https://platform.openai.com/docs/guides/function-calling
-
82% success Make tool implementations idempotent and conflict-safe
Use optimistic locking or compare-and-swap patterns
Sources: https://platform.openai.com/docs/guides/function-calling
Dead Ends
Common approaches that don't work:
-
Execute all parallel tool calls concurrently as requested
75% fail
Concurrent execution of dependent tool calls causes race conditions
-
Ignore the parallel flag and run sequentially always
60% fail
Running everything sequentially defeats the performance benefit