Skip to content

[Bug]: Client SDK and Server SDK expect different objects for Tasks #843

Closed

Description

@Tyler-Bath

What happened?

The 1.0 Client SDK and the Server SDK differ in what they expect task objects to look like. The client expects a list of task to be as follows:
"tasks": [ { "id": "someId", "contextId": "contextId", ... } ]
But the server actually serves back the following with an extra object wrapper around the task fields:
"tasks": [ { "task": { "id": "someId", "contextId": "contextId", ... } } ]

And according to the task spec it would seem the client is correct and the issue comes in around the way the "StreamingEventKind" with the STREAMING_EVENT_ID = "task" is applied to the response objects returned from the server implementation.

Image

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added theissue type on Apr 30, 2026
  2. Tyler-Bath commented on Jun 4, 2026

    @Tyler-Bath
    Author

    This issue arose for us from using the a2a SDK JsonUtils GSON mapper to write out our responses from our server to be returned to clients. The GSON mapper has adapters for the Streaming event kind built in which will add the "task" wrapper around task objects when the object are written out as a json string.

    The solution for us was to use our own mapper to manage the writing of the json for our respones we return from the server so they will not be wrapped and the client sdk can then read the response correctly.

    TLDR: dont use the SDK JsonUtils GSON mapper to write out responses from your A2A server.

  3. added a commit that references this issue on Aug 3, 2026
    d72f540
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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions