I am seeing an intermittent issue where my voice agent exposes raw tool call JSON directly inside the live conversation and transcript during function execution.
In the attached screenshot, the caller asked in Spanish about a GMC Terrain or a similar SUV. The agent correctly triggered the vehicle inquiry flow and called the vehicle lookup function, but shortly after that, the agent output raw JSON like this inside the conversation:
There were many similar JSON lines shown in the agent message. These should remain internal and should not be spoken to the caller or surfaced as normal agent dialogue.
I already tried changing the function speech settings, including enabling and disabling speak during function execution and speak after function execution. I also added strict instructions in the agent prompt telling the agent not to output JSON, tool payloads, internal function calls, or system/tool data to the caller. The issue still happens intermittently.
Expected behavior: The agent should call the tool internally and only speak natural language to the caller, such as “I am checking the inventory now.”
Actual behavior: The agent sometimes outputs raw tool call JSON into the conversation during function execution.
This is affecting live customer calls because it makes the agent sound broken and exposes internal tool call details. Could you please investigate whether this is a runtime issue, a tool calling serialization issue, or a bug with how function calls are being injected into the transcript or agent response?
I can provide the full call ID privately if needed. I redacted client facing details from the attached screenshot for privacy.
Hi Adeel — we’ve seen a very similar issue before on one of our agents after switching from a previously stable GPT model to a newer one.
In our case, the agent started verbalizing tool/function payloads almost exactly like this, even though the prompt clearly instructed it not to expose JSON, internal tool calls, or system/tool data. The function flow itself was working, but the model was treating the tool call representation as something it could say back to the user.
What fixed it for us was rolling the agent’s global prompt model back to the previous stable GPT model. Once we stepped the model down, the same agent went back to normal natural-language speech during function execution.
My working theory is that when newer GPT models first become available inside Retell, there can sometimes be a short period where the model/tool-call behavior is not as reliable inside a real-time voice runtime as it is in normal chat testing. It may not be your prompt or function settings at all, especially if you’ve already tested “speak during function execution,” “speak after function execution,” and added strict no-JSON instructions.
I’d try duplicating the agent, switching only the LLM/model version back one step, and running the same call path again. If the JSON leakage disappears, that gives support a very clear reproduction path: same agent, same function, same prompt, different model behavior.
If you need the newer model specifically, I’d probably keep the production agent on the previous stable model for now and retest the newer model again later once the integration behavior stabilizes.
Thanks Alex, really appreciate the help and suggestion. I’ll definitely test that by duplicating the agent and trying another model version to compare the behavior.
The interesting part is that I’m not even on the latest GPT model right now. I’m already using the stable one, so I’m curious to see if the issue still ends up being model related.
Thanks again, this definitely gives me a good direction to troubleshoot further.
Hey @shaw, yes, I can share the relevant Call ID and Agent ID.
Since this is for a client project, would it be okay if I send you a DM instead of posting the details publicly in the thread? I can share the exact Call ID, Agent ID, and anything else your team needs there.
I’m not able to find the option to send you a DM from my side. Would it be possible for you to send me a DM first? I can then reply there with the relevant Call ID, Agent ID, and any other details your team needs.