Closed
Description
Problem
InMemoryTaskStore.list_tasks() returns only a tasks array, missing the REQUIRED pagination fields from the A2A v1.0 spec.
Spec Reference
A2A v1.0 ListTasksResponse message in specification/a2a.proto:
message ListTasksResponse {
repeated Task tasks = 1 [(google.api.field_behavior) = REQUIRED];
string next_page_token = 2 [(google.api.field_behavior) = REQUIRED];
int32 page_size = 3 [(google.api.field_behavior) = REQUIRED];
int32 total_size = 4 [(google.api.field_behavior) = REQUIRED];
}All four fields are REQUIRED by the spec.
Reproduction
Start any agent using InMemoryTaskStore and call ListTasks:
curl -X POST http://localhost:PORT -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"ListTasks","params":{},"id":"1"}'Actual response:
{"result": {"tasks": []}}Expected per spec:
{"result": {"tasks": [], "totalSize": 0, "pageSize": 50, "nextPageToken": ""}}Impact
The A2A TCK (a2aproject/a2a-tck) has 12+ mandatory tests for ListTasks that all fail against any agent using InMemoryTaskStore. This means every reference implementation built with the Python SDK will fail TCK mandatory tests.
Proposed Fix
InMemoryTaskStore.list_tasks() should:
- Apply pagination using
pageSizeandpageTokenparameters - Return
totalSize(total matching tasks before pagination) - Return
pageSize(the page size used) - Return
nextPageToken(empty string if no more pages)
This is a correctness issue per the spec, not just a nice-to-have.
Metadata
Metadata
Assignees
Labels
No labels
Activity
zeroasterisk commentedon Mar 20, 2026
Update after verification: I just inspected the v1.0.0a0 SDK source (
server/tasks/inmemory_task_store.py) and thelist()method DOES returntotal_size,page_size, andnext_page_tokencorrectly viaa2a_pb2.ListTasksResponse(...).The 12 TCK ListTasks test failures are NOT caused by missing pagination fields. The real root cause is likely a2a-tck #146 — the
create_test_taskhelper polls for WORKING state before running ListTasks tests, but synchronous agents skip WORKING and go straight to COMPLETED, so the helper times out.Closing as invalid — the SDK implementation is correct.