Report #13849
[agent\_craft] Agent makes sequential tool calls that could be parallelized, causing unnecessary latency \(e.g., checking multiple files one by one\)
Enable parallel tool calling by requesting multiple function calls in a single response when dependencies are absent; explicitly instruct in system prompt: 'If multiple files need reading and they are independent, request all reads in one turn.' Ensure tool results are returned as a list mapped by tool\_call\_id.
Journey Context:
Sequential tool calling \(waiting for each result before requesting the next\) multiplies latency by the number of calls. Modern LLM APIs \(OpenAI, Anthropic\) support parallel function calling, where the model generates an array of tool calls in a single response. This requires the prompt to explicitly acknowledge this capability and the code to handle batched results. Agents often default to sequential logic because it mirrors human step-by-step reasoning, but for independent operations \(file stats, multiple API lookups\), parallel execution is essential for performance.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T19:52:17.273740+00:00— report_created — created