Agentic Workflow returns duplicate responses intermittently

Prabhu22ap
Tera Contributor
Hi Community,
 
I am testing a ServiceNow Agentic Workflow and have observed that the agent occasionally returns the same response multiple times in the conversation, even though I expect only a single output.
 
The issue is intermittent and does not happen for every execution.
 
I would like to understand:
 
1. Is there a configuration to ensure that only one final response is returned to the user?
2. Can duplicate responses occur due to multiple node executions, retries, tool invocations, or streaming behavior?
3. Has anyone encountered this behavior in Agentic Workflows, and if so, how was it resolved?
 
Any guidance on troubleshooting steps or best practices would be greatly appreciated.
 
Thanks.
5 REPLIES 5

sanjaygupta
Tera Guru

Duplicate replies usually happen because more than one part of the workflow is speaking to the user. There's no single switch for "one final response," but you can control who speaks and when. Field names vary by release, so confirm them in your instance.

Start by finding where each duplicate comes from.

  • Go to AI Agent Studio and open your agentic workflow.
  • Run it from the Testing tab until a duplicate appears.
  • Open the execution plan and check which step produced each copy.

The most common cause is a tool sending output to the user while the agent also summarizes it.

  • Open each agent's tools and check the output setting.
  • Set tools to return output to the agent only.
  • Let the agent write the single final reply.

If your workflow has several agents, each one may be sending its own closing message.

  • Pick one agent to give the final reply.
  • In the other agents' instructions, tell them not to address the user.

Intermittent duplicates often mean the agent retried a step because a tool was slow, failed, or returned unclear output.

  • Check the execution plan for the same tool running twice.
  • Test that tool on its own and fix any errors or timeouts.
  • Make the tool return a short, clear success message.
  • Add "Give one final answer and do not repeat earlier messages" to the agent's instructions.

If duplicates show up only in your live chat, a Virtual Agent topic may be answering alongside the agent.

  • Compare results in the studio test panel and your live channel.
  • Check Virtual Agent topics for overlapping triggers.
  • Search Now Support for known errors in your release.

Test these changes in sub-production first. If it still happens, share your release, the number of agents and tools, and the channel you're using.

My Agentic workflow has 6 agents each have a specific role. Output is coming correctly but only problem is with the duplicate responses. I have also mentioned in the agent's role to provide only one single response, but the problem is sometimes it is giving only one response and sometimes it is giving same response 2 times. Not sure what is causing the issue

Have you considered doing a test run from the studio? Did it show you anything?

With six agents, the most likely cause is that two of them sometimes end up writing the final reply, or the orchestrator runs the last agent twice. The orchestrator plans the steps fresh each run, so the plan can differ slightly each time. That’s why it’s intermittent, and why a line in one agent’s role isn’t enough to stop it.

First, compare a good run with a duplicate run.

  • Open AI Agent Studio and run the workflow from the Testing tab several times.
  • Open the execution plan for one clean run and one duplicate run.
  • Compare which agents ran and in what order.
  • Note whether the duplicate is word-for-word identical or slightly reworded.

    Please mark the answer helpful if you find it helpful

    Thanks

Vamsi_Krishna07
Tera Guru

Hello @Prabhu22ap,

 

A few questions to help narrow down the issue:

 

1. Which LLM service are you using?

2. What output types have you configured under the tool’s Advanced Settings?

3. Where are you triggering/using this Agent?

 

When the agent generates the expected response, please provide a thumbs-up 👍 to help evaluate its behavior.

 

Also, try refining your prompt to explicitly define the expected output format in the list of steps and instruct the agent to strictly follow it and return only one final response. Adjusting the prompt this way may help prevent duplicate or repeated responses.

 

Thanks,

Vamsi