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

ADK v1.18.0 crashes with DatabaseSessionService when event compaction is enabled

Open hung12ct opened this issue 1 year ago • 11 comments

** Please make sure you read the contribution guide and file the issues in the right place. ** Contribution guide.

Describe the bug ADK crashes with the error 'dict' object has no attribute 'start_timestamp' when event compaction is enabled in v1.18.0.

To Reproduce Please share a minimal code and data to reproduce your problem. Steps to reproduce the behavior:

  1. Install google-adk==1.18.0
  2. Enable event compaction in the ADK configuration, for example: events_compaction_config=EventsCompactionConfig( compaction_interval=1, overlap_size=0, )
  3. Start a session and begin chatting.
  4. After follow-ups exceed the compaction interval, the crash occurs.

Expected behavior ADK should not crash; chatting should continue normally with event compaction enabled.

Screenshots

Image

Desktop (please complete the following information):

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

Model Information:

  • Are you using LiteLLM: Yes/No
  • Which model is being used(e.g. gemini-2.5-pro)

Additional context

  • As a temporary workaround, I’ve removed the compaction config.
  • A PR has been sent to fix this issue: https://github.com/google/adk-python/pull/3490

hung12ct avatar Nov 11 '25 07:11 hung12ct

Fix in progress.

hangfei avatar Nov 14 '25 15:11 hangfei

This should be fixed in https://github.com/google/adk-python/commit/0094eea3cadf5fe2e960cc558e467dd2131de1b7

DeanChensj avatar Nov 27 '25 06:11 DeanChensj

Reproduced the bug in v1.20 and v1.21. The code has been reverted in https://github.com/google/adk-python/commit/9d918d45df4275b5b464e46817d2daaa03859fe3

StevenHwl avatar Dec 16 '25 08:12 StevenHwl

Reproduced the bug in v1.20 and v1.21. The code has been reverted in 9d918d4

@DeanChensj Hi, should it be re-opened?

cthtuf avatar Dec 18 '25 19:12 cthtuf

I get this error currently in 1.21

ryanovas avatar Dec 22 '25 04:12 ryanovas

We face this from 1.18 till 1.21, fix is tiny and we even need to make fork for this 😑

constantinef avatar Dec 22 '25 08:12 constantinef

Could this issue be fixed as soon as possible? It has been ongoing for over two months.

xiangcongshao-debug avatar Dec 26 '25 07:12 xiangcongshao-debug

@DeanChensj Can we reopen this ticket and merge https://github.com/google/adk-python/pull/3490? This is blocking a major feature and the fix looks incredibly simple...

ryanovas avatar Dec 28 '25 20:12 ryanovas

Any update on this issue? Still facing it in 1.21 and it's a hard block for enabling adk in production

tmacraft avatar Jan 01 '26 20:01 tmacraft

This appears to be resolved in 1.22 for me

ryanovas avatar Jan 12 '26 22:01 ryanovas

Hi, the previous fix was rolled back and now roll forwarded, should be fixed now.

DeanChensj avatar Jan 13 '26 00:01 DeanChensj