You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Client SDK and Server SDK expect different objects for Tasks #843
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.
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.
Activity
Tyler-Bath commentedon Jun 4, 2026
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.
fix(jsonrpc): avoid wrapping tasks in list responses (a2aproject#998)