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
BUG: ADK fails for the next user query just after the even compaction event has been generated #4000
Facing issues in getting response from ADK for the user input just after even compaction event has been generated.
File "/Users/Shekhar/cosmos-adk-v3/venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 375, in _run_one_step_async
async for event in agen:
yield event
File "/Users/Shekhar/cosmos-adk-v3/venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 465, in _preprocess_async
async for event in agen:
yield event
File "/Users/Shekhar/cosmos-adk-v3/venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/contents.py", line 50, in run_async
llm_request.contents = _get_contents(
~~~~~~~~~~~~~^
invocation_context.branch,
^^^^^^^^^^^^^^^^^^^^^^^^^^
invocation_context.session.events,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
agent.name,
^^^^^^^^^^^
)
^
File "/Users/Shekhar/cosmos-adk-v3/venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/contents.py", line 354, in _get_contents
events_to_process = _process_compaction_events(raw_filtered_events)
File "/Users/Shekhar/cosmos-adk-v3/venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/contents.py", line 265, in _process_compaction_events
compaction.start_timestamp is not None
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'start_timestamp'
We are currently analyzing this issue. Could you please provide the reproduction steps and a minimal reproducible code snippet? That would help us a lot.
Hello, @llalitkumarrr, I encountered the same error. I opened an issue yesterday, but it hasn’t been very helpful so far. I believe this may be the same issue described in #4082.
I'm using google-adk version 1.21.0, and I also tried 1.20.0 and 1.19.0, but the issue persists across all of them.
The code below reproduces the error — it was run entirely in a single cell on a Kaggle CPU notebook. The problem seems related to compaction, which is triggered at turn 4, as I set compaction_interval = 3.
Let me know if you want to add any logs or stack trace reference as well.
Activity
llalitkumarrr commentedon Dec 29, 2025
Hello @MahorShekhar ,
Could you please provide more information to help us understand this issue better? A minimal reproducible code example would be very helpful.
Also, if you are not already using the latest version, please upgrade to google-adk==1.21.0. You may also find this page in docs useful.
MahorShekhar commentedon Dec 29, 2025
hi @llalitkumarrr this issue is related to this one : #3707
llalitkumarrr commentedon Dec 29, 2025
We had two releases after this, could you please try to test with latest version?
ryanovas commentedon Dec 30, 2025
@llalitkumarrr There are multiple issues all relating to the same bug originally reported here: #3487
It is still an issue in 1.21.
There is a pull request open that fixes this here: #3490
This has been an issue for some time and multiple tickets created for it:
llalitkumarrr commentedon Jan 7, 2026
Hi @MahorShekhar ,
We are currently analyzing this issue. Could you please provide the reproduction steps and a minimal reproducible code snippet? That would help us a lot.
nicwang119 commentedon Jan 7, 2026
Same issue as above
Hello, @llalitkumarrr, I encountered the same error. I opened an issue yesterday, but it hasn’t been very helpful so far. I believe this may be the same issue described in #4082.
I'm using google-adk version 1.21.0, and I also tried 1.20.0 and 1.19.0, but the issue persists across all of them.
The code below reproduces the error — it was run entirely in a single cell on a Kaggle CPU notebook. The problem seems related to compaction, which is triggered at turn 4, as I set
compaction_interval = 3.Let me know if you want to add any logs or stack trace reference as well.
Thanks.
Code snippet
code_snippet.txt
Code response
code_response1.txt
rparme commentedon Jan 9, 2026
Same issue with 1.19.0 and 1.21.0.
We are also using a DatabaseSessionService.
llalitkumarrr commentedon Jan 14, 2026
Hello @ankursharmas ,
Could you please find some time to look into this and share your inputs?
wuliang229 commentedon Jan 20, 2026
This issue should be gone in the 1.22.1 version as ADK uses a new schema for the DatabaseSessionService.