Fix premature end_of_agent in sub-agent resumption (Issue #5349)#5386
Draft
9chait9 wants to merge 1 commit intogoogle:mainfrom
Draft
Fix premature end_of_agent in sub-agent resumption (Issue #5349)#53869chait9 wants to merge 1 commit intogoogle:mainfrom
9chait9 wants to merge 1 commit intogoogle:mainfrom
Conversation
…pauses for LRO tool call.
Collaborator
|
Response from ADK Triaging Agent Hello @9chait9, thank you for creating this PR! To help reviewers to review your PR more efficiently, could you please add a In addition, could you please provide logs or a screenshot after the fix is applied? Thanks! |
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.
Fixes #5349.
This PR addresses a bug where the orchestrator incorrectly assumes that any sub-agent resumption marks the final completion of the sub-agent's task. This caused the runner to early-exit on subsequent resumptions because it incorrectly set
end_of_agent=Truewhen a sub-agent paused for an LRO (Long Running Operation) tool call.The fix introduces a
sub_agent_pausedflag to track if the sub-agent paused during its execution, ensuringend_of_agent=Trueis only set when the sub-agent has truly completed.