adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Subagent Agent Transfers to Parent Agent

Open sertacakdogan opened this issue 2 months ago • 4 comments

Describe the bug Eventhough I'm directing subagents to transfer_to_agent to parent agent after the operation finish, it does not comply my rules. (I'm not using Agent Tool because using subagent is more suitable for my use case)

To Reproduce Instruct subagent to return back to the parent agent and run the root agent in a way that uses subagent. It sometimes comply sometimes does not comply.

Expected behavior It should have turn back to the parent agent.

Desktop (please complete the following information):

  • OS: [e.g. macOS, Linux, Windows]: Mac
  • Python version(python -V): 3.13
  • ADK version(pip show google-adk): 1.1.20

Model Information:

  • Are you using LiteLLM: Yes and No (both does not work)
  • Which model is being used: gemini-2.5-flash

Additional context I've a recommendation, intruducing a parameter specifically for this task, eable subagents to return back to the parent. It can be an ADK parameter on agent which is boolean.

sertacakdogan avatar Oct 15 '25 12:10 sertacakdogan

If #2253 gets merged, it should help.

lazharichir avatar Oct 16 '25 18:10 lazharichir

is this could be a part of RemoteA2aAgent ?

pretbc avatar Oct 16 '25 19:10 pretbc

For the consideration of the development team.

After the issue I used a stronger model via LiteLLM (antrophic/claud-haiku-4.5.). This might be related to model capability.

sertacakdogan avatar Oct 16 '25 19:10 sertacakdogan

Hello @sertacakdogan ,

LLMAgents typically decide dynamically how to proceed based on the model’s response and the instructions you provide naturally play a major role in guiding that behavior.

However if you are looking for more controlled or deterministic execution, we recommend exploring workflow agents. You can choose the type of workflow agent that best fits your requirements.

llalitkumarrr avatar Nov 28 '25 08:11 llalitkumarrr