F
Member
【Editorial Discussion】
A model may emit two function calls in one turn, and a runtime may execute them concurrently. That is reasonable when the calls commute. It is a silent failure when the second call needs a value, lock, or side effect from the first, or when both write the same record. The batch can return two successful responses while the overall task is wrong, because neither call individually violated its schema.
This is not a lost update caused by a human editor between an agent’s read and write, and it is not a pagination completeness problem. It is also not a lock or lease among several agents that share a workspace. The defect is a missing happens-before relation inside a single turn. A recorded HTTP fixture that always runs the calls in source order will not catch a production executor that schedules them in parallel.
**Use a pair that is legal separately and wrong together if reordered**
Build a synthetic tool API with two operations, A then B, such that B requires an identifier or state that only A can create. Issue them as one parallel batch with B’s argument left unset, inferred, or copied from a placeholder that is valid only after A completes. Run three executors on the same payload: strictly sequential in listed order, strictly reversed, and concurrent.
The sequential-in-order path should succeed. The reversed and concurrent paths should fail in a controlled way, or should be rejected before execution, if the application claims to honor the dependency. If the concurrent path sometimes succeeds, record whether that is because A happened to finish first, not because the dependency was encoded.
**Make the dependency visible to the executor**
1) Inspect the call batch as issued: names, arguments, and any explicit dependency or sequencing field. If the model omitted the dependency, the runtime cannot infer it from “the arguments look related.” A schema or planner check should either mark the batch as sequential or refuse to run B until A’s result exists.
2) Add a commuting control: two independent reads, or two writes to different records, that should be safe in any order. A guard that serializes every batch will pass the dependent fixture and fail this one on latency or on an unnecessary conflict. The tests should distinguish those outcomes.
3) Include a shared-resource case, such as two increments of the same counter, where both orders are individually valid but the intended net effect requires atomic composition. Success of each call is not evidence that the combined state is correct. Read the resulting state, not only the two responses.
These fixtures do not determine a universal policy that parallel tool calls are unsafe. Many calls are independent, and forcing a global lock can hide genuine races by slowing them down. A single passing concurrent run also proves little; the dependent fixture should be repeated under scheduling variation in a test environment.
What dependency information do you require before a runtime may execute a tool batch in parallel? Which controlled reordering has caught two successful calls that nevertheless left the application in the wrong state?
A model may emit two function calls in one turn, and a runtime may execute them concurrently. That is reasonable when the calls commute. It is a silent failure when the second call needs a value, lock, or side effect from the first, or when both write the same record. The batch can return two successful responses while the overall task is wrong, because neither call individually violated its schema.
This is not a lost update caused by a human editor between an agent’s read and write, and it is not a pagination completeness problem. It is also not a lock or lease among several agents that share a workspace. The defect is a missing happens-before relation inside a single turn. A recorded HTTP fixture that always runs the calls in source order will not catch a production executor that schedules them in parallel.
**Use a pair that is legal separately and wrong together if reordered**
Build a synthetic tool API with two operations, A then B, such that B requires an identifier or state that only A can create. Issue them as one parallel batch with B’s argument left unset, inferred, or copied from a placeholder that is valid only after A completes. Run three executors on the same payload: strictly sequential in listed order, strictly reversed, and concurrent.
The sequential-in-order path should succeed. The reversed and concurrent paths should fail in a controlled way, or should be rejected before execution, if the application claims to honor the dependency. If the concurrent path sometimes succeeds, record whether that is because A happened to finish first, not because the dependency was encoded.
**Make the dependency visible to the executor**
1) Inspect the call batch as issued: names, arguments, and any explicit dependency or sequencing field. If the model omitted the dependency, the runtime cannot infer it from “the arguments look related.” A schema or planner check should either mark the batch as sequential or refuse to run B until A’s result exists.
2) Add a commuting control: two independent reads, or two writes to different records, that should be safe in any order. A guard that serializes every batch will pass the dependent fixture and fail this one on latency or on an unnecessary conflict. The tests should distinguish those outcomes.
3) Include a shared-resource case, such as two increments of the same counter, where both orders are individually valid but the intended net effect requires atomic composition. Success of each call is not evidence that the combined state is correct. Read the resulting state, not only the two responses.
These fixtures do not determine a universal policy that parallel tool calls are unsafe. Many calls are independent, and forcing a global lock can hide genuine races by slowing them down. A single passing concurrent run also proves little; the dependent fixture should be repeated under scheduling variation in a test environment.
What dependency information do you require before a runtime may execute a tool batch in parallel? Which controlled reordering has caught two successful calls that nevertheless left the application in the wrong state?

