Tool-call syntax spoken aloud instead of silently invoking transfer_call/end_call

Hi Retell Support,

We are seeing a high-severity issue where a Retell agent is audibly speaking internal tool-call syntax to the caller instead of silently invoking the relevant tool.

Org ID: org_vKVl7EVrGjqQoEMi
Call ID: call_3d1060f0314e28d3cf68e817d5c
Agent ID: agent_6469ced6df072b5c1788a25e60
Call type: Outbound phone call
LLM Model: GPT 4.1

During the call, the user agreed to speak with one of our insurance advisors. The agent correctly said the transfer handoff message:

“Sounds great, Robert. I will transfer you over to them now. Please stay on the line, one of our insurance advisors will be with you in a moment.”

However, instead of silently invoking the transfer tool, the caller then heard the agent say the following internal tool syntax aloud:

functions.transfer_call

The transfer did not complete. The agent then continued speaking, repeating “please stay on the line” messages for several minutes, as if it believed the transfer/waiting state had started.

Later in the same call, after the user was still waiting and asked to speak with the advisor, the agent also audibly spoke the end-call syntax instead of silently invoking the tool:

functions.end_call

The user then said, “No. Hello?” because the call had not ended cleanly, and the agent repeated the closing message and again exposed:

functions.end_call

This is not isolated to this one client.

We previously saw the same class of issue on another client’s Retell calls, where the agent audibly said internal tool-call syntax instead of silently invoking the tool.

After that incident, we updated our agents based on Retell’s documented tool-calling best practices, including removing backticks/code-style formatting around tool names and making the prompt wording clearer so tools should be used silently.

Despite those updates, the issue is still occurring.

Can you please investigate this specific call and confirm:

  1. Why functions.transfer_call and functions.end_call were emitted into the spoken transcript/TTS output.
  2. Whether this is related to a Retell runtime, LLM, streaming, or tool-calling regression.
  3. Whether there is a recommended setting, tool/prompt configuration, or stricter tool-calling mode we should use to prevent internal tool syntax from ever reaching the caller.
  4. Whether this has anything to do with the agent continuing to speak “please stay on the line” messages after the transfer should have started.

Expected behaviour:

The caller should hear only the normal handoff sentence, then the transfer should start silently. The caller should never hear internal tool names, function names, markdown, JSON, or anything beginning with functions.

Actual behaviour:

The caller heard functions.transfer_call and later functions.end_call spoken aloud by the agent, and the transfer did not complete as expected.

This is urgent because it impacts live production outbound calls and creates a poor caller experience. Please review the call log, transcript with tool calls, and any internal execution traces for the call above.

Thank you

Hey @Sean_Whelan_AYB_AI I have already forwarded this call to the team and discussed it with one of our engineers. It appears that this issue is occurring more frequently than usual, and the team is actively investigating it. We appreciate your patience and will provide updates as soon as we have more information. Thank you.

Thank you @mark1 - appreciate it

Hey @Sean_Whelan_AYB_AI Team checked the logs for this call and verified this is a hallucination from the model. The model had access to the tools the entire time, it was just choosing to output it as text rather than as a proper tool call. Team suspect the reason it’s doing this is the END_CALL section of your prompt: “do not include any function call syntax for the end_call function.” This phrasing is a bit confusing, because the model needs to output function call syntax in order to call the tool as well. Try deleting that line and replacing the whole END_CALL block with a single positive instruction, something like “After you say ‘Goodbye’ as your last line, invoke the end call tool,” with no “do not” wording around function syntax.

Thank You

Thanks for your help Mark, we will try that

What model are you using?

@tonnic we are using GPT 4.1

Thanks for checking this.

We’ll update the END_CALL section based on your recommendation and replace that block with a simple positive instruction, e.g. “After you say ‘Goodbye’ as your last line, invoke the end call tool.”

However, the part I’m still concerned about is the transfer_call issue, which wasn’t addressed in your response.

In this same call, before the end-call section was ever reached, the caller agreed to be transferred and the agent said the correct handoff message, but then audibly output:

functions.transfer_call

Instead of silently invoking the transfer tool.

This is the main issue we need help diagnosing, because it has now happened across three separate client accounts/agents recently.

We’ve been using Retell for roughly 18 months and had never seen agents audibly speak function/tool syntax like this before.

After the first incident, we updated our agents based on the tool-calling best practices in the Retell docs, including removing backticks/code-style formatting and making the tool instructions clearer, but the issue is still persisting.

Can your team please specifically review the transfer_call behaviour here and confirm:

  1. Why the model output functions.transfer_call as spoken text instead of making a proper tool call, even though the transfer tool was available?

  2. Whether there have been any recent Retell runtime, model, prompt-handling, or tool-calling changes that could explain why this transfer issue has started happening recently across multiple of our clients.

  3. Whether there is a stronger recommended prompt format for transfer_call specifically?

  4. Whether there is a model/configuration setting you recommend to prevent tool syntax from ever being streamed to TTS.

The end_call wording may explain the later functions.end_call hallucination, but it doesn’t explain why functions.transfer_call was spoken aloud earlier in the call.

**That transfer issue is the more critical production issue for us, so any guidance on preventing this would be appreciated.
**
Thank you

Hey @Sean_Whelan_AYB_AI Team suspects that the END_CALL wording may be feeding the transfer_call leak too. The line “do not include any function call syntax for the end_call function” is about end_call, but the model may have applied that same idea to transfer_call. We haven’t changed anything on our side that would cause this, and GPT-4.1 is fine, so the prompt is the likely culprit.

Thank You

Thank you @mark1, we will update the prompt to see if that resolves the issue - we got some good suggestions from the new co-pilot feature, so hopefully its recommended changes can fix it

The new co-pilot features seems to have resolved this issue we were experiencing, it’s the best addition to Retell yet!

I’ll update you here if anything changes, thanks @mark1