Skip to content

BUG: ADK fails for the next user query just after the even compaction event has been generated #4000

@MahorShekhar

Description

@MahorShekhar

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'

Metadata

Metadata

Assignees

Labels

core[Component] This issue is related to the core interface and implementationplanned[Status] This issue is planned to be work on by ADK eng team

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions