Follow me on LinkedIn - AI, GA4, BigQuery

Check your voice agent prompt for zero width character immediately after creating the first draft of the prompt.

What are zero-width characters in Voice Agent Prompt?

Your voice agent prompt shows {{current_time_America/New_York}}. It looks clean. But one character after the closing braces is a zero-width space, and you can't see it.


A zero-width character is a real Unicode character that renders as nothing. It has a code point, it counts in the character count, and it gets stored and sent. It just takes up no visible space on the screen.

The common ones are the zero-width space (U+200B), the zero-width joiner (U+200D), the zero-width non-joiner (U+200C), and the byte-order mark (U+FEFF).


They get in through copy-paste. 

Google Docs, Notion, web pages, and some editors inject them as formatting artefacts. You paste a block of prompt text and carry an invisible passenger with it.


You can not manually delete them either.

Zero-width characters can break a Voice Agent.

For example, a zero-width space next to {{current_time}} can stop the variable from populating. 

Retell matches the exact token between the braces. 

A hidden character on the border can break that match, and the literal text {{current_time}} gets passed to the model instead of the real time.


The same failure can hit any string match in your agent.

  • Dynamic variables don't substitute.
  • Tool and function names don't resolve.
  • Conditional logic that compares strings silently fails.

It can also break JSON. 

A stray zero-width character inside an agent config or import file makes the JSON invalid, and the import fails with an error that points to nowhere useful.

The deeper cost is debugging time. 

The character is invisible, so when the agent misbehaves, you stare at a prompt that looks perfect and find nothing. 

You can lose hours or even days to a problem with no visible cause.

How to detect Zero-width characters in an agent prompt?