Skip to content

RuntimeError: This generation handle does not allow interruptions #4443

@devb-enp

Description

@devb-enp

Bug Description

I'm constantly getting error in sentry for this line
livekit/agents/voice/speech_handle.py in interrupt at line 110

if not force and not self._allow_interruptions:
    raise RuntimeError("This generation handle does not allow interruptions")

There's no manual interruption that is in the code from our side and the agent always runs on allow_interruption=False

Expected Behavior

This error only makes sense if i try to interrupt without the force=True flag while allow_interruption=False.
For internal flow, it shouldn't throw runtime errors.

Reproduction Steps

I haven't tried reproducing it as it doesn't seem to have any implication on the session. But the sentry is constantly recording this error.

Operating System

python:12-slim

Models Used

No response

Package Versions

livekit-agents[anthropic,assemblyai,azure,codecs,deepgram,elevenlabs,groq,google,hume,images,openai,resemble,silero,turn-detector]==1.3.3

Session/Room/Call IDs

No response

Proposed Solution

Additional Context

No response

Screenshots and Recordings

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions