Skip to content

A2A client renders thought parts together with final user-facing response #4676

@EliavShbt

Description

@EliavShbt

🔴 Required Information

Describe the Bug:
In A2A mode, the local ADK client displays both internal thought text and the final user-facing answer in one combined response.
The response payload contains multiple text parts, including one with metadata.adk_thought: true, but the client renders both instead of filtering thought content.

Steps to Reproduce:

  1. Install google-adk and run an ADK server with A2A enabled.
  2. Run a local ADK client against that A2A server.
  3. Send a normal user request that produces a multi-part response.
  4. Inspect the returned message/task parts: one part has metadata.adk_thought: true, another part is the final answer.
  5. Observe that the client output shows both parts concatenated in user-visible output.

Expected Behavior:
Only non-thought/final content should be shown to the user.
Parts marked with adk_thought: true should be hidden from user-facing rendering.

Observed Behavior:
Thought/internal text is rendered to the user together with final answer text.

Environment Details:

  • ADK Library Version (pip show google-adk): <fill>
  • Desktop OS: Linux
  • Python Version (python -V): <fill>

Model Information:

  • Are you using LiteLLM: <Yes/No>
  • Which model is being used: <fill>

🟡 Optional Information

Regression:
Unknown / not yet verified.

Logs:

Sanitized payload shape observed:
parts[0]: kind=text, metadata.adk_thought=true, text=<internal reasoning>
parts[1]: kind=text, text=<final user answer>
Rendered output combines both parts.

Additional Context:
This appears to be a client-side rendering/filtering issue for thought parts in A2A responses.

Minimal Reproduction Code:

# Pseudocode (sanitized)
response = client.send_message("test request")
for i, p in enumerate(response.parts):
    print(i, p.kind, getattr(p, "metadata", None), getattr(p, "text", None))
# Observed: part with adk_thought=true is still rendered in final UI output.

How often has this issue occurred?:
Always (100%)

Metadata

Metadata

Assignees

No one assigned

    Labels

    a2a[Component] This issue is related a2a support inside ADK.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions