fix: reject inline tasks during agent handoff - #7268
Merged
chenghao-mou merged 6 commits intoSep 15, 2026
Merged
Conversation
Reject inline tasks from an outgoing activity once handoff starts. This breaks the circular wait between activity shutdown and a tool awaiting the transition lock, while preserving normal inline-task pause and resume. Co-authored-by: Dan Tran <danganhtran@me.com>
chenghao-mou
marked this pull request as ready for review
September 14, 2026 14:29
longcw
approved these changes
Sep 15, 2026
theomonnom
approved these changes
Sep 15, 2026
chenghao-mou
deleted the
chenghao/fix/AGT-3502-inline-task-handoff-deadlock
branch
September 15, 2026 09:36
chenghao-mou
added a commit
to swayamg20/agents-js
that referenced
this pull request
Sep 15, 2026
Block inline tasks only during agent transitions, so standalone drain can still finish an in-flight AgentTask. Match the transition error and add the applicable regression cases from livekit/agents#7268. Addresses AGT-3502 Refs livekit#2483 Co-authored-by: Dan Tran <danganhtran@me.com>
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.
An outgoing tool that starts an
AgentTaskduring handoff can deadlock the session. Reject it with aToolErrorexplaining that the agent transition must finish before retrying. Public drain keeps its existing behavior.Reproduces @dtran26's report in agents-js#2483. The Python fix was developed independently; the similar JS fix was discovered afterward.
Addresses AGT-3502.
Initial prompt and agent context
Model: GPT-6
Essential follow-up instructions: