Report #21378
[agent\_craft] Agent makes slow sequential tool calls when independent operations could run in parallel
Use 'dependency-graph execution': Analyze tool calls to identify independent branches \(no data dependencies\). Return multiple tool\_calls in a single response when they are parallelizable \(e.g., reading 3 unrelated files, checking 2 different APIs\). Force sequential only when step N requires output from step N-1 \(e.g., read file → parse ID → fetch details\).
Journey Context:
Naive agent loops often force one tool call per LLM turn, causing massive latency \(network roundtrips \+ LLM inference time\). Modern LLMs \(GPT-4, Claude 3.5\) support parallel function calling, but agents must be architected to exploit this. The key insight is data flow analysis: if two file reads don't depend on each other, they should be batched. However, over-parallelizing dependent operations causes race conditions or failures. The pattern mirrors async/await vs. Promise.all\(\) in programming.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:17:42.428193+00:00— report_created — created