Report #12790
[agent\_craft] Parallel tool calls cause race conditions or incorrect execution order when tools have dependencies
Explicitly disable parallel tool calling \(set parallel\_tool\_calls: false in OpenAI API\) when: \(1\) tools have side effects \(file writes, database updates\), \(2\) subsequent tools depend on the output of previous tools \(e.g., read file then edit file\), or \(3\) tools consume limited API rate limits. Only enable parallel calls for independent, read-only operations \(e.g., search \+ calculate\).
Journey Context:
OpenAI's API supports parallel tool calls to reduce latency, but this is dangerous for coding agents. If an agent calls 'write\_file' and 'read\_file' on the same path in parallel, the result is non-deterministic. Similarly, editing line 5 of a file and then editing line 10 requires sequential execution because line numbers shift after the first edit. Many agent frameworks default to parallel=True for speed, causing subtle, hard-to-reproduce bugs. You must explicitly force sequential execution for stateful operations by setting the parallel\_tool\_calls parameter to false.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:54:06.360810+00:00— report_created — created