Skip to content

Fix A2A protocol chunk streaming and task completion states#1113

Merged
copybara-service[bot] merged 1 commit intogoogle:mainfrom
glaforge:fix/a2a-agent-executor-last-message
Apr 8, 2026
Merged

Fix A2A protocol chunk streaming and task completion states#1113
copybara-service[bot] merged 1 commit intogoogle:mainfrom
glaforge:fix/a2a-agent-executor-last-message

Conversation

@glaforge
Copy link
Copy Markdown
Contributor

@glaforge glaforge commented Apr 6, 2026

Summary

This PR fixes issues where A2A endpoints would prematurely truncate streams or drop events during conversational handoffs.

Key Changes

  • Stream Persistence: RemoteA2AAgent no longer aborts streams prematurely on HTTP endpoints. It now properly waits for the formal TaskState.COMPLETED status update.
  • Artifact Chunking (append/lastChunk): Fixed flag assignments in AgentExecutor so the first chunk reliably sends append=false and lastChunk cleanly mimics the generated partial state.
  • Protocol Alignment: Removed the Message payload in the final success event to perfectly reflect the Go A2A reference implementation.
    Testing: Validated against the a2a_server with the a2a_basic client, fully restoring end-to-end multi-agent evaluation output natively. All unit tests succeed.

@glaforge glaforge force-pushed the fix/a2a-agent-executor-last-message branch 8 times, most recently from 56ac1c8 to 16d38c3 Compare April 8, 2026 14:37
@glaforge glaforge force-pushed the fix/a2a-agent-executor-last-message branch from 16d38c3 to c6017e6 Compare April 8, 2026 15:14
@glaforge glaforge changed the title Fix A2A agent executor missing last message Fix A2A protocol chunk streaming and task completion states Apr 8, 2026
@glaforge glaforge force-pushed the fix/a2a-agent-executor-last-message branch from c6017e6 to 74fd328 Compare April 8, 2026 15:18
This PR fixes issues where A2A endpoints would prematurely truncate streams or drop events during conversational handoffs.

* Stream Persistence: RemoteA2AAgent no longer aborts streams prematurely on HTTP endpoints. It now properly waits for the formal TaskState.COMPLETED status update.
* Artifact Chunking: Fixed flag assignments in AgentExecutor so the first chunk reliably sends append=false and lastChunk cleanly mimics the generated partial state.
* Protocol Alignment: Removed the Message payload in the final success event to perfectly reflect the Go A2A reference implementation.
@glaforge glaforge force-pushed the fix/a2a-agent-executor-last-message branch from 74fd328 to c95f669 Compare April 8, 2026 15:43
@copybara-service copybara-service bot merged commit 4a4ccf1 into google:main Apr 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants