google / google/adk-web

Session history stops rendering at the first A2A event without content

Open Beginner friendly
#523 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1k
Forks
267
Avg merge
1d 12h
Merged PRs (30d)
9

Description

**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.

Contributor guide

Open the contributing guide

Research direction

Start in chat.component.ts at buildUiEventFromEvent around line 2722, then trace updateWithSelectedSession and appendEventRow. Reproduce with a session containing a RemoteA2aAgent and inspect the reload path's handling of contentless A2A task-status events. Done means reloading the session renders all events after the first remote-agent event, matching the completed live run.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.