Tool Call Stuck Executing: Urgent
# support
n
We ran into an isue where there are times tool calls will just get stuck executing, but only in certain circumstances. It seemed to happen consistently when content was being returned with a tool call to make. In the logs we see the tool call executing. This is a custom function athat hits our server. Our server returns a response, but the assistant does not say anything, including idle messages and the conversation continues until the user hangs up. Call IDs: 0199cb83-d011-7aad-8e08-0ea72c478f08 0199cb7e-78be-788a-8695-bf68ac7765ec 0199cb76-a097-7dd4-966c-8bbee2528aa2
v
I’ve dealt with similar issues where the assistant hangs after a tool call response. It usually happens when the server’s return format doesn’t fully match the expected content schema. I can help review your response structure and Make setup to spot where it’s breaking. Could you confirm if your server returns content: [{ type: "output_text", text: "..." }]? @Noah Johnson
n
@Vercel I will confirm. The wierd thing is that it works most of the time. It was just once I changed my prompt and the LLM was returning "content" along with the tool call that it started breakign
So we are just using 4o-mini managed by Vapi. OUr tool server does seem to be returning the message in the proper fformat
v
Ah, that explains a lot. When the model sends both content and a tool call together, it can easily cause things to freeze up. I can help you check your prompt and handler to make sure the response gets processed smoothly or split properly. If you can share your prompt and the JSON your server returns, I’ll help you sort it out quickly. @Noah Johnson
n
I was able to fix the prompt, but am concerned with that behavior. I just don't think that a prompt change should case that to freeze up since it is something supported by the LLM
@Vercel I apprciate the help, I just am curious why this is something that Vapi would not support
v
Yeah, I totally get that — you’re right, a simple prompt change shouldn’t cause things to freeze. It’s likely just how Vapi handles mixed “content + tool call” responses at the moment. I can help you test that setup and tweak it so it runs smoothly even when both are returned. Want me to help you check it out together? @Noah Johnson
c
When instructing the assistant to say a phrase then execute a tool call, it will cause it to freeze (most likely waiting for a response from user to continue). To prevent this, use the tool messages like
request-start
to say these messages instead. If you need conditions, those can also be set for each
request-start
message through the API.
n
That seems extremely brittle. We can instruct the LLM to not have this behavior, but it feels like something that should be supported. This can unlock things like having the LLM determine what to say based on the conversation rather than a static message. We could train it to return messages in the correct translation. Or just have a more natural conversation. This is not uncommon for LLMs to do. Is there any plan to fix this behavior?
This continues to cause issues for us as it can be difficult to create a consistent experience with many tool calls
REOPEN
5 Views