Report #22906
[synthesis] Agent executes parallel tool calls that race on shared resources \(e.g., read/write same file\), causing corruption or non-deterministic results
Resource-lock analysis before dispatch: before executing a batch of parallel tool calls, statically analyze the target resources \(file paths, DB keys, URLs\) of each call. If any resource appears in both a read and write or multiple writes, serialize those specific calls into a sequential chain while keeping independent calls parallel.
Journey Context:
Modern agent frameworks \(e.g., OpenAI's parallel function calling\) allow the LLM to request multiple tool calls in one turn for efficiency. However, the agent often requests a 'read file X' and 'write file X' in the same batch, or two different writes to the same config file. Without explicit dependency analysis, these execute in a non-deterministic order, leading to lost updates or read-before-write inconsistencies. Simply disabling parallel calls solves the safety issue but destroys throughput. The fix is to treat the tool call batch as a transaction schedule: extract the resource identifiers \(e.g., regex for file paths in arguments\), detect conflicts, and impose a partial order that respects write-after-read and write-after-write dependencies.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:51:13.840811+00:00— report_created — created