Skip to content

Text fallback from agent not rendered in A2UI, page refreshes silently #585

Description

@PratikWayase
Screen.Recording.2026-01-30.233048.mp4

When the agent fails to return data (e.g., no restaurants found, or max retries exhausted), the backend correctly sends a TextPart fallback message

Example backend log:

ERROR:agent:--- RestaurantAgent.stream: Max retries exhausted. Sending text-only error. ---

However, the frontend (A2UI) does not render this TextPart, and the UI appears to silently refresh or remain blank. Users never see the intended fallback message like:

Oops, I couldn’t find anything you requested.

Expected Behavior:
TextPart messages from the agent should be rendered in the UI, similar to how DataParts are displayed, so users see a clear error or fallback message.

Expected Behavior:
TextPart messages from the agent should be rendered in the UI, similar to how DataParts are displayed, so users see a clear error or fallback message.

Steps to Reproduce:

Query the agent with a request that triggers failure, e.g., “Chinese restaurants in Sydney” or any nonexistent location.

Observe the backend logs, which show a TextPart fallback message.

Observe the frontend: no message is displayed, and the page may refresh or remain blank.

Actual Behavior:

Backend sends the fallback TextPart.

Frontend fails to render it.

User sees no visible feedback.

Suggested Fix / Workaround:
Modify A2UI to handle TextPart messages and render them visibly. Example:

if (part.type === 'TextPart') {
const container = document.getElementById('fallback-container');
container.textContent = part.text;
container.style.display = 'block';
}

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

    P2The team intends to work on this in the near future, or at a lower priority.component: lit renderertype: bugSomething isn't working

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions