fix: release stale transcript gates and playout pauses - #7083
Open
chenghao-mou wants to merge 2 commits into
Open
fix: release stale transcript gates and playout pauses#7083chenghao-mou wants to merge 2 commits into
chenghao-mou wants to merge 2 commits into
Conversation
Held STT start-of-speech events were replayed while agent playout still appeared active, which rearmed the gate. Mark playout inactive first and release any stale gate or buffered transcripts at agent speech end.
chenghao-mou
added a commit
to livekit/agents-js
that referenced
this pull request
Sep 1, 2026
Replayed STT speech-start events observed active agent playout and rearmed the transcript gate. End playout before replay and release stale buffered events at agent speech end. Ports livekit/agents#7083 at c27a885e.
RunContext.disallow_interruptions() could leave its current speech paused by false-interruption handling. A tool that awaited session.say() then deadlocked behind the paused parent. Route the state change through the owning activity so it releases only that handle's pause.
chenghao-mou
force-pushed
the
chenghao/fix/AGT-3421-clear-stale-transcript-gate
branch
from
September 1, 2026 18:35
1dfa299 to
36f2ec4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem: False or overlapping speech could leave held transcripts or a parent response active after the interruption ended. The stale state produced concurrent speaking spans and could block uninterruptible tool speech, preventing transfers.
Behavior: Resolve playout before replaying held STT events. When a tool disables interruptions, release its parent response from any false-interruption pause so queued speech can run.
Addresses AGT-3421
Initial prompt and agent context
Model: GPT-5.6