Skip to content

Session history stops rendering at the first A2A event without content #523

Description

@yourlogarithm

Describe the bug

Reloading the dev UI on a session that used a RemoteA2aAgent renders only the events that precede the remote agent's first event. Everything after it is missing from the UI, although the session API returns it.

buildUiEventFromEvent passes event.content?.parts straight into combineA2uiDataParts when the event carries a2a:response custom metadata (chat.component.ts:2722). A remote agent's task-status events carry that metadata and have no content, so the loop over parts throws TypeError: parts is not iterable. On session load, updateWithSelectedSession calls appendEventRow in a bare forEach, so the throw aborts the loop and every later event is dropped. Live streaming is unaffected, because that call site catches.

To reproduce

  1. Run an agent that has a RemoteA2aAgent sub-agent.
  2. Send a message and let the run finish — the UI renders it correctly.
  3. Reload the page and open the same session.
  4. Only the events before the remote agent's first event are shown.

Expected behavior

The reloaded session shows the same history as the finished run.

Version

chat.component.ts:2722 on main; observed through the bundle shipped in google-adk 2.8.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions