fix: restore speaking state when releasing playout pause - #7087
Merged
Conversation
chenghao-mou
force-pushed
the
chenghao/fix/AGT-3421-restore-paused-speaking-state
branch
from
September 4, 2026 16:29
1dfa299 to
b471217
Compare
chenghao-mou
force-pushed
the
chenghao/fix/AGT-3421-restore-paused-speaking-state
branch
from
September 4, 2026 20:07
b471217 to
ffc8ead
Compare
theomonnom
approved these changes
Sep 4, 2026
tinalenguyen
approved these changes
Sep 4, 2026
chenghao-mou
deleted the
chenghao/fix/AGT-3421-restore-paused-speaking-state
branch
September 4, 2026 20:31
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.
Stacked on #7083.
A false-interruption pause can start just before a parent response invokes a transfer tool. #7083 releases the pause when the tool calls
disallow_interruptions(), but audio resumed while the session still reportedlisteningand recognition reported no agent speech.State sequence:
H1is the parent response that includes the tool call.H2is the transfer message produced bysession.say().H1starts playingspeaking_agent_speaking=TrueH1pausesSession:
listening_agent_speaking=FalseSaved state:
speakingdisallow_interruptions()H1stays pausedState stays
listening/FalseH1resumesState incorrectly stays
listening/Falsespeaking/TrueThen
H1resumesH1audiolistening/Falsespeaking/TrueH2startsH1H1First frame corrects the state
H1No state correction needed
Affected application pattern:
Deterministic reproduction
The committed test delays the transfer tool until a parent response is playing, then starts a false-interruption pause before the tool runs:
Run it from the repository root:
Without the fix, the callback at
audio_output.resume()observes("listening", False). With the fix, it observes("speaking", True).Addresses AGT-3421
Initial prompt and agent context
Model: GPT-5.6