Report #92091
[agent\_craft] Agent makes sequential dependent calls when independent calls should be batched
Detect independent tool calls \(no data dependencies between arguments\) and issue them in a single LLM request with parallel tool execution enabled. Aggregate results into a single Observation message formatted as a JSON array of results mapped by tool\_call\_id.
Journey Context:
Modern LLM APIs \(OpenAI, Anthropic\) support parallel function calling, allowing multiple independent tool invocations in one round-trip. Agents often default to sequential loops \(call A, wait, call B\), adding linear latency. However, batching requires ensuring true independence—if Tool B's arguments depend on Tool A's result, parallel execution causes race conditions or errors. The fix is static analysis of the call graph or explicit dependency tagging in the tool schema. Alternatives like always-sequential are safe but slow; always-parallel risks execution errors. Conditional batching based on dataflow analysis is the high-signal pattern for latency optimization.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:09:50.384375+00:00— report_created — created