Why Not Execute Parallel Tool Calls Concurrently?

Author: SavkosiiCreated Jan 15, 2026Updated Mar 27, 2026

I noticed that when OpenAI's model returns multiple tool calls in a single response, the executor processes them sequentially:

go
// agents/executor.go, lines 111-114
for _, action := range actions {
    steps, err = e.doAction(ctx, steps, nameToTool, action)
    if err != nil {
        return steps, nil, err
    }
}

When the model returns multiple tool calls in one iteration, it has already determined these tools can be executed independently (no dependencies between them). The code even has comments acknowledging this:

go
// agents/openai_functions_agent.go, line 208
// Group steps by their position to handle multiple tool calls
// that might be executed in parallel

Is there a specific reason why these parallel tool calls are executed sequentially rather than concurrently?