Invisible Character Broke Guardrails for 3 Weeks: Stop Blaming the LLM

Dustersvk · reddit · 2026-08-10

A team running a bilingual voice agent noticed their model randomly slipping back into Slovak during English conversations—a classic symptom of LLM nondeterminism. After wasting time tweaking prompts, they discovered the root cause in their server-side code.

A regex bug caused the guardrail to silently fail. A Python patch script incorrectly interpreted \b as a backspace character (0x08) and wrote it into the JavaScript file. Because the byte is invisible in editors, no one noticed it during review. The regex never matched, meaning the English language directive was never injected into the prompt.

Key engineering takeaways:

The broader lesson: much of what gets blamed on model nondeterminism is actually deterministic code quietly failing.

Original post →

More from coding & agent

coding & agent channel →