little-kite-91953
12/05/2025, 10:52 PMinterrupt 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 respondtall-airline-16756
12/05/2025, 10:52 PMtall-airline-16756
12/05/2025, 10:52 PMinterrupt 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