Skip to content

Support sub-agent escalation event in ParallelAgent #5104

@jinnigu

Description

@jinnigu

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

🔴 Required Information

Please ensure all items in this section are completed to allow for efficient
triaging. Requests without complete information may be rejected / deprioritized.
If an item is not applicable to you - please mark it as N/A

Is your feature request related to a specific problem?

ParallelAgent does not short-circuit when a sub-agent emits an escalation event (actions.escalate = True). Other sub-agents continue running to completion unnecessarily.

This is the Python counterpart of google/adk-java#561, resolved in google/adk-java#612.

Describe the Solution You'd Like

When any sub-agent emits an event with actions.escalate = True, the ParallelAgent should yield the escalation event, immediately cancel all remaining sub-agent tasks, and mark itself as complete in resumable mode. This should work for both the Python 3.11+ and pre-3.11 code paths.

Impact on your work

Needed for feature parity between adk-java and adk-python. LoopAgent already supports escalation; ParallelAgent should too.

Willingness to contribute

Yes

Metadata

Metadata

Labels

core[Component] This issue is related to the core interface and implementationneeds review[Status] The PR/issue is awaiting review from the maintainer

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions