🚚 Why the agent repeated the same tracking message
During testing of a delivery tracking flow, the agent sometimes repeated the same message after receiving a tracking number:
> “I will check the delivery status now.”
At first, this looked like a duplicate integration event.
However, after reviewing the logs, we confirmed that the integration was not being triggered twice. The issue was in the scenario logic.
There were two branches with very similar meanings:
🔹 tracking status is empty
🔹 tracking status is unavailable
Both branches led to almost the same agent response. As a result, repeated tests produced unstable behavior: sometimes the agent treated the case as an empty status, and sometimes as an unavailable status.
The fix was to make both the conditions and the responses clearly distinct.
For example:
If the status is empty:
> “I’m still checking that. Please give me a moment.”
If the status is unavailable:
> “Could you please double-check the tracking number?”
After separating the branches more clearly, each condition had a specific response, and the repeated message issue was resolved.
Key takeaway:
If two scenario branches have similar conditions and produce almost identical responses, they can create unstable agent behavior.
To avoid this:
✅ make branch conditions mutually exclusive
✅ make agent responses clearly different
✅ repeat the same test several times to confirm stability
A single successful test is not enough. Reliable behavior should be consistent across repeated runs.