Evaluation

Voice Agent Test Harness False Interruption: Why The Synthetic Caller Talks Over The Agent

The failure happens because a finalised agent transcript arrives over the network before the agent finishes playing the audio for that line. If your synthetic caller loop speaks the moment the text finalises, it will barge in on the agent’s trailing audio and trigger a false interruption. The fix is structuring the caller into an explicit hear, think, speak loop with an instrumented settle window between the transcript arriving and the caller publishing its first audio frame. This turns an unmeasured race condition into a visible metric.

Symptoms

  • The simulated caller speaks over the agent’s trailing audio.
  • The agent registers an interruption and halts its output.
  • The conversational turn structure collapses immediately.
  • The run fails for a reason that has nothing to do with the actual behaviour being tested.
  • Conversely, if the caller waits too long, the agent re-prompts the user, and the run hits its turn cap before reaching the scenario’s outcome.

What is actually happening

Transcript finalisation and audio playout completion are distinct events on any realtime stack. The network delivers the finalised text of an agent’s line over a WebSocket or WebRTC data channel much faster than the agent can play out the corresponding audio frames. The finalised transcript text arrives before the agent finishes playing out the audio frames for that line.

If your synthetic caller runs a loop that speaks the moment text finalises, it will barge in on essentially every turn. The agent is still draining its audio buffer and speaking its final syllables when the synthetic caller publishes its first frame. The agent detects incoming audio while trailing sound is still playing, registers an interruption, and collapses the turn structure.

The usual patch for this is adding a fixed sleep, chosen by feel, directly into the loop. This hides the immediate symptom but bakes an unmeasured constant into every test result the harness will ever produce. If your driver has a fixed sleep in it and no metric next to that sleep, you cannot tell whether a future barge-in failure is an agent regression or a test harness timing flaw.

How to confirm it

  1. Log the timestamp when the agent transcript line finalises and compare it to the timestamp of the synthetic caller’s first published audio frame. Expect the text event to arrive hundreds of milliseconds before the audio finishes; this delta confirms the race condition exists.
  2. Check the failure reason on a broken run. Expect the agent to log an interruption exactly when the synthetic caller publishes its first audio packet.
  3. Add an extended pause before the synthetic caller publishes its first frame. Expect the false interruptions to disappear and agent re-prompts to spike, confirming that the harness is reacting too quickly.

How it works

I structure the synthetic caller as an explicit hear, think, speak loop. The harness awaits the next finalised agent line, asks the persona model for the next utterance, waits a settle window, speaks, and repeats until a terminal packet arrives or a watchdog fires.

The critical piece is instrumenting the settle window as a first-class metric. I record the milliseconds from the agent’s line finalising to the caller’s first outgoing frame on every single turn. The constant is still a constant, but it is now visible in the run corpus and can be moved against a distribution instead of against an opinion.

Currently, 0.8 s is the shipped default settle window between the agent’s line finalising and the caller speaking. This is not a measured optimum, and the distribution has not yet been pulled. The instrumentation exists so that sentence can stop being true. Along with the timing delta, the harness records the turn index against the scenario’s cap and logs whether the loop ended due to a terminal packet type or a watchdog expiry.

What I would check first

  1. Check the terminal reason recorded in the run log to see if the session ended via a watchdog expiry. A watchdog expiry rules out conversational barge-in or reprompt cap issues and isolates an unresponsive model or hung transport.
  2. Check whether the run hits its turn cap before a terminal packet arrives. Hitting the cap rules out the harness reacting too fast and points to the opposite failure: the synthetic caller waits too long, causing the agent to re-prompt and consume the available turns.
  3. Compare the recorded settle window against the scenario’s barge-in logs to isolate caller timing from agent regressions. An interruption logged when the settle metric is near zero milliseconds isolates premature harness speech, while an interruption logged after playout completes points to an agent-side regression.

Why unmeasured constants ruin test suites

Any autonomous conversational test driver has this problem, on any stack. The failure is inevitable because text and media travel on different paths and process at different speeds. When engineers encounter the resulting barge-in loops, the immediate instinct is to write a delay function.

A hardcoded sleep solves the immediate pain, and the runs start passing again. But months later, an agent prompt change or a network latency shift causes failures to spike. The team investigates the agent, looking for regressions in the voice activity detection or the endpointing logic. The harness is applying a static delay to a dynamic process, and the delay is no longer long enough.

You must be plain about where your constants stand. Recording the exact milliseconds elapsed from the text arriving to the caller speaking gives you a number to attach to the failure.

Instrumentation over guesswork

The goal of the eval harness is separating bad agent behaviour from bad harness timing. A failure must mean the agent failed, not that the test framework tripped over its own feet.

The telemetry I pull per turn gives me the exact reason the loop ended. If it ends on a watchdog expiry, the network dropped or the agent froze. If it hits the turn cap, the agent and the caller got stuck in a re-prompt loop. If it registers an interruption, I look directly at the settle window metric.

If you are building an evaluation platform for voice agents, treat the timing of your synthetic caller as a variable that requires monitoring. Instrumenting the gap between the agent finishing and the caller starting is the only way to prove your test results mean what you think they mean. You cannot eliminate the delay between receiving a text event and generating speech, but you can definitely make it visible.

Common questions

Why does my synthetic caller interrupt the voice agent?

The caller is likely reacting to a transcript finalisation event instead of the end of the audio track. Text arrives over the network faster than audio plays out. If the caller speaks immediately upon receiving text, the agent will still be playing audio and will register a barge-in.

How long should a test caller wait before speaking?

I use a 0.8 s default settle window between the agent’s line finalising and the caller speaking. This is a baseline, not a measured optimum. You must instrument this gap so you can tune it against your own distribution of test runs.

Why does my voice agent hit the turn cap in tests?

The synthetic caller is waiting too long to respond. When the silence exceeds the agent’s endpointing threshold, the agent issues a re-prompt. This consumes conversational turns without progressing the scenario until the cap is reached.

How do I fix a caller barging in on test turns?

Structure the synthetic caller into an explicit hear, think, speak loop. Await the finalised transcript, ask the persona model for a reply, and wait a specific settle window before publishing the first audio frame.

Evaluation

The scorer is a program too, and it is wrong more often than the agent

When evaluation pipelines misclassify perfect voice agent runs, the scorer is at fault. Fix brittle regex logic with a two-tier deterministic and LLM system.