Does `interrupt` remove the current AI message fro...
# ask-ai
l
Does
interrupt
remove the current AI message from the history? I find that the AI says the same thing again if I call it while the AI is speaking, and then make it respond
t
Thanks for reaching out, Tom. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking whether
interrupt
removes the current AI message from history so the model won't repeat itself. Yes — calling
interrupt()
stops the agent's current speech and truncates that response in the conversation history so the incomplete/Interrupted text is not fully committed. This is intended to prevent the agent from repeating the same content when you ask it to respond again. If you still see repeats, common causes are: • The full response was already generated and added to history before the interrupt took effect. • Your LLM pipeline reprocesses the earlier (partial) output or doesn't rebuild context after interruption. To avoid repeats: • Call
session.interrupt()
(or
handle.interrupt()
) as soon as you want to stop the agent. • Ensure your pipeline regenerates a fresh response from the truncated history rather than resuming the previous generation. Would you like me to walk through how you’re calling
interrupt()
(code or sequence) so I can spot where repeats might be coming from? Sources: Turn detection and interruptions | LiveKit Docs