Agents Speaking Tool Outputs

Hey there,

We’re seeing a big spike in agents speaking the results of their JSON. We’re seeing them speak both the input and output JSON when a tool call is made, alongside a normal message.

It seems like this one might have an easy fix - are you guys able to patch this by blocking JSON in the spoken output?

This is impacting more and more calls and seems to be especially prominent on reasoning models (although that’s mostly obversational).

Thanks!

Hey @jze Could you please share the relevant \ Call ID and agent ID? This will help us investigate the issue further.

Thank you.

call_c7313a79ff75ef6a7b84b2dd78f agent_344f2c6edb6922d4576ae9c7c2 call_dc8c0c8034c6f395050234f4870 agent_34ef8c02ccab2fe5c437c94e67 call_5a4300e94b93dd8a9fbcd458737 agent_478c4913a5938a5dd9b3e8d39d call_0506e7017e1e2c05454c0fe1f74 agent_07e0c82c3d1b5f7d9cacee4633 call_9823a0b957ea661a30307e71b43 agent_494787b2165f5a22328d64cab0 call_967e1d97ff87b5d65872b261bdc agent_3ec4aad00ee0ee92a6cdb9dcbf call_70c1aa0dbfcb064b2cf12d3300b agent_494787b2165f5a22328d64cab0

@jze I have reported this to the team for further investigation. We’ll get back to you as soon as we have an update.

Thank You

Hey @jze Thanks for the report and the call list — this one is worth a direct answer on the JSON-strip request.

  • What’s happening: On the sampled calls we can see the literal {"execution_message":"..."} envelope in the LLM’s assistant content channel with per-word TTS timings, alongside a correctly-fired structured tool_call. That’s the known GPT-5-family “dual-emission” pattern where the model writes its tool-call arguments into the spoken channel at the same time as invoking the tool. It matches across all 5 affected agents in your org (all on gpt-5.2), so it isn’t a Retell voice-pipeline bug or a prompt authoring issue.

  • On “can Retell just block JSON before TTS”: not safely as a blanket filter — legitimate speech contains braces, quotes, and numerics, and heuristic stripping cuts real content mid-utterance. A targeted scrubber that removes only tool-call scaffolding (function-name fences and the execution_message args envelope) is the right shape of platform fix; we’ll surface this to engineering as a feature request tied to your org so it gets prioritized. No ETA I can commit to today.

  • What reliably reduces it right now:

  1. Set static “speak during execution” text on the affected tools (end_call and the booking/note tools). When that field is populated the runtime speaks the static string instead of asking the model to generate transitional speech — that’s the surface where the envelope is leaking.
  2. Add a positive core rule to the prompt: “Only invoke tools via the structured tool-call channel; never write JSON, function names, or tool arguments in your spoken reply.” This is probabilistic, not a fix.
  3. For any agent where the tradeoff is acceptable, swapping off the GPT-5 family (e.g. gpt-4o) removes the class of failure entirely.

Thank You