Skip to content

Fix premature end_of_agent in sub-agent resumption (Issue #5349)#5386

Draft
9chait9 wants to merge 1 commit intogoogle:mainfrom
9chait9:fix/issue-5349-v4
Draft

Fix premature end_of_agent in sub-agent resumption (Issue #5349)#5386
9chait9 wants to merge 1 commit intogoogle:mainfrom
9chait9:fix/issue-5349-v4

Conversation

@9chait9
Copy link
Copy Markdown

@9chait9 9chait9 commented Apr 18, 2026

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=True when a sub-agent paused for an LRO (Long Running Operation) tool call.

The fix introduces a sub_agent_paused flag to track if the sub-agent paused during its execution, ensuring end_of_agent=True is only set when the sub-agent has truly completed.

@adk-bot adk-bot added the core [Component] This issue is related to the core interface and implementation label Apr 18, 2026
@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Apr 18, 2026

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 Testing Plan section to your PR to describe how you will test this fix?

In addition, could you please provide logs or a screenshot after the fix is applied?

Thanks!

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

Labels

core [Component] This issue is related to the core interface and implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sub-agent with sequential LRO tools fails to resume

2 participants