https://retellai.com/?utm_source=discord&utm_medium=seo logo
Agent verbally exposes internal function name & JS...
# ❓・bug-report
n
Hello Retell team, we are reporting a critical bug where our agent is leaking internal function names and JSON responses to the user, completely breaking the intended conversational flow. Agent Setup It's a single prompt agent. We have a function configured to run at the very beginning of the call. This function is designed to classify the user before any greeting is exchanged. This function has speak_during_execution enabled. It has a fixed, static message it is supposed to say (e.g., "Hello, please wait a moment while I retrieve your file.") Expected Behavior: When a call starts, the agent should only say the pre-configured, static message defined in speak_during_execution. Actual Behavior (The Bug): Intermittently, the agent does the following instead: It completely ignores the configured speak_during_execution text. It verbally announces the internal function name (e.g., "Executing function classify_user..."). It then proceeds to speak the raw JSON response from that function directly to the user. Potential Trigger This bug seems to be triggered far more often when there is background noise on the user's end at the exact moment the call connects. It seems the initial audio input is confusing the agent, causing it to bypass the speak_during_execution text and default to announcing its internal state. Impact This is a high-priority issue for us. It exposes our internal logic, sounds highly robotic and broken, and "kills" the interaction before it even begins, providing a terrible user experience. Troubleshooting We have already tried applying the recommended changes provided by Evy support, but the issue still persists. Could you please look into this? We need to find a way to force the agent to only say the speak_during_execution message and never announce the function name or its output.
c
what model are you using for this?
n
gpt 5 with an elevenlabs voice
d
We have the same issue today. It's persistent on every call whether via web or phone twillio. We're using Eleven Labs and Gemini 2.5 Turbo and a Cartesia voice. This hasn't happened for 100% of calls before.
@Colin - Integrations @ Retell AI is there a fix to this issue. The agent keeps verbalizing the internal function reading out "interrupting, voice rising" as in "Agent: (interrupting, voice rising slightly) Responsibility, please clarify.
c
gemini isn't very reliable unless you have an overprompted agent, it's been known to be unstable
the only fix is having a very strict prompt or using a different model
unfortunately we don't own gemini 2.5 so we can't modify the internal workings of it
try 4.1 mini though
d
Very helpful! That worked. I also used Claude 4.5 Haiku and it worked comparably. Thank you!@Colin - Integrations @ Retell AI
n
Hi @Colin - Integrations @ Retell AI is there a fix to my case, i'm using GPT 5 with a eleven labs voice
Hi @Colin - Integrations @ Retell AI do you have the chance to check my case? is there anything i can do to fix it?