You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
State-delta-only resume of a paused composite-root invocation raises 'No agent to transfer to' #8476
Describe the bug
Resuming a paused composite-root invocation with only a state_delta (no new message, no function response) applies the delta and then raises:
ValueError: No agent to transfer to for resuming agent from function response child
Reproduced on main (2.15.1) with a SequentialAgent root whose LlmAgent child is paused on a LongRunningFunctionTool, then resumed with state_delta={"k": "v"} only. The same resume on a direct LlmAgent root works. Found while testing #8408 (see the discussion on #8407).
Likely cause (from @surajksharma07's analysis on #8407): the delta-only resume stores a content-less user event, which becomes the last event on the branch. LlmAgent's resume lookup (llm_agent.py ~1022-1038) treats any user-authored last event as a function response, finds no matching call, and raises. Skipping user events that carry no function response in that lookup should fix it.
Expected: the delta is applied and the paused child stays resumable (or the resume completes without error), as on a direct LlmAgent root.
Environment: ADK main (2.15.1), Python 3.11, macOS. No model call needed to reproduce.
I'd like to send a fix with a regression test for Sequential, Parallel and Loop roots.
Activity