Repository navigation
Description
reproduce_hold_interval_events.txt
the bug**
When long-running tools are mixed with normal tools, we get a situation where there are multiple tool responses in the event list for the same initial tool call event (multiple tool calls in one event, but individual events for each call following). There seems to be a filter rule in the ADK that expects there to be just one response for each call and it will find the last response for a call and remove all events in between. This makes no sense since shortly after, there is code to consolidate the multiple tool responses into a single event with all the responses. The path here is to just not call the function that removes some of the tool responses.
To Reproduce
Steps to reproduce the behavior:
- Download the attached script
- Convert the .txt file to .py format
- Run the script by 'python reproduce_hold_interval_events.py'
This script creates user and model events. The model event triggers both long_running_tool and calculator.add. In response, long_running_tool returns its execution status through two response events: one indicating in progress and the other done.
Expected behavior
The script should print both responses of task 679448613268, which are in progress and done.
parts=[Part( text='Give me updates on a long task and add 2+2.' )] role='user' parts=[Part( function_call=FunctionCall( args={ 'query': 'some task' }, id='679448613268', name='long_running_tool' ) ), Part( function_call=FunctionCall( args={ 'a': 2, 'b': 2 }, id='179448613268', name='calculator.add' ) )] role='model' parts=[Part( function_response=FunctionResponse( id='179448613268', name='calculator.add', response={ 'result': 4 } ) )] role='model' parts=[Part( function_response=FunctionResponse( id='679448613268', name='long_running_tool', response={ 'status': 'in progress' } ) )] role='model' parts=[Part( text='The sum is 4 and the tool is still running.' )] role='model' parts=[Part( function_response=FunctionResponse( id='679448613268', name='long_running_tool', response={ 'result': 'done' } ) )] role='model'
Desktop (please complete the following information):
- OS: MacOS
- Python version(python -V): 3.12.0
- ADK version(pip show google-adk): 1.8.0
Model Information:
Using Mockup instead of a real LLM model.
** Additional comment:**
Sent a PR for this fix.
#2214
Activity
klateefa commentedon Nov 18, 2025
@alimosa Thanks for reporting the issue!
Can you please try the latest ADK version and check if the issue is resolved? If the issue still persists, could you share minimal reproducible code and the steps to reproduce it? This help us to understand the issue in detail
Thanks!
llalitkumarrr commentedon Dec 12, 2025
Marking this issue as closed due to inactivity, please feel free to reach out in case this issue is not resolved or for more support.
Thank you!!