Bug Description
The legacy A2aAgentExecutor in a2a_agent_executor.py has several finalization issues:
-
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.
-
Truncated streaming text: Delta-style text streaming only retains the last chunk; earlier partial text is discarded in the synthesized final artifact.
-
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
Bug Description
The legacy
A2aAgentExecutorina2a_agent_executor.pyhas several finalization issues:Wrong terminal status: When the final ADK event has no content parts (metadata-only or action-only), finalization produces
final=Truewithstatus=workinginstead ofcompleted, leaving clients with a "still processing" Task that never updates.Truncated streaming text: Delta-style text streaming only retains the last chunk; earlier partial text is discarded in the synthesized final artifact.
Missing artifact metadata: The synthesized final
TaskArtifactUpdateEventdoes not carry response metadata, soTask.artifacts[*].metadatais empty.Expected Behavior
status=completedAffected Files
src/google/adk/a2a/executor/a2a_agent_executor.py