Skip to content

fix: Prevent shutdown hang when speech is active during disconnect - #1100

Merged
toubatbrian merged 3 commits into
mainfrom
brian/prevent-shutdown-hang
Mar 7, 2026
Merged

fix: Prevent shutdown hang when speech is active during disconnect#1100
toubatbrian merged 3 commits into
mainfrom
brian/prevent-shutdown-hang

Conversation

@toubatbrian

@toubatbrian toubatbrian commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix AgentActivity.interrupt() to cancel all speech tasks and force-mark speech handles done when force=true, resolving the interrupt future immediately instead of waiting for tasks to complete
  • Fix AgentSession._closeSoon() to assign the closeImpl promise to closingTask, preventing duplicate shutdown calls (matching Python)
  • Update AgentActivity.close() to cancel remaining speech tasks before closing session resources

@changeset-bot

changeset-bot Bot commented Mar 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bdd1c9e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 21 packages
Name Type
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-phonic Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugins-test Patch
@livekit/agents-plugin-xai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@toubatbrian
toubatbrian requested review from a team and lukasIO March 6, 2026 02:07
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@toubatbrian
toubatbrian merged commit d52d6f4 into main Mar 7, 2026
8 checks passed
@toubatbrian
toubatbrian deleted the brian/prevent-shutdown-hang branch March 7, 2026 01:07
@github-actions github-actions Bot mentioned this pull request Mar 7, 2026
@lukasIO

lukasIO commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

@toubatbrian does this close any of the related user reports?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants