-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
core[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementation
Milestone
Description
Describe the bug
when using after_agent_callback the current agent receives the handoff even if they already handoff to another agent
To Reproduce
Given 3 agents:
root_agent
A_agent
B_agent
A_agent has a after_agent_callback implementation. It can be nothing, just a return None.
Flow:
- user input -> root_agent -> A_agent -> response user
- user reply -> A_agent -> response
- user reply -> A_agent -> B_agent
Here's the problem
4) user reply (sending a image) -> A_agent (but should be the B_agent as the last one used).
This only occurs if I add the after_agent_callback in the A_agent
Expected behavior
The handoff should continue to B_agent, not be interpreted to A_agent, as A_agent already handoff to B
Desktop (please complete the following information):
- OS: MacOS
- Python version 3.11
- ADK version 1.16.0
Model Information:
- Are you using LiteLLM: Yes/No
- Which model is being used(e.g. gemini-2.5-pro)
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
core[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementation