Skip to content

Legacy A2A executor finalizes metadata-only responses as status=working instead of completed #5188

@YizukiAme

Description

@YizukiAme

Bug Description

The legacy A2aAgentExecutor in a2a_agent_executor.py has several finalization issues:

  1. Wrong terminal status: When the final ADK event has no content parts (metadata-only or action-only), finalization produces final=True with status=working instead of completed, leaving clients with a "still processing" Task that never updates.

  2. Truncated streaming text: Delta-style text streaming only retains the last chunk; earlier partial text is discarded in the synthesized final artifact.

  3. Missing artifact metadata: The synthesized final TaskArtifactUpdateEvent does not carry response metadata, so Task.artifacts[*].metadata is empty.

Expected Behavior

  • Finalization without failure/interaction should produce status=completed
  • Streamed text chunks should be accumulated for the final artifact
  • Final artifact events should propagate response metadata

Affected Files

  • src/google/adk/a2a/executor/a2a_agent_executor.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    core[Component] This issue is related to the core interface and implementation

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions