Even if toolUseBehavior
of an agent is set as run_llm_again
(it is the default behavior but I still set it to be sure), agent is not called again after tool calls. Instead the agent run that asks for tool calls also creates an output, and it is given as the final output of the multi agent system. The tools are also called later on.
It was not an issue (it was too rare) while I was using gpt-4.1
but it almost always do that with gpt-4.1-mini
.
Notice that first Responses API call of Sales Agent calls functions, but also generates a response without waiting the functions to be called. Then functions are called but…
AGENT FLOW
SALES AGENT → Responses API response
SALES AGENT → response of one of the tool calls