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]: ListTasks pagination restarts or fails when the task behind the page token changes #1280
In both DatabaseTaskStore.list and InMemoryTaskStore.list, next_page_token is the ID of the first task of the next page, not a position in the sort order. The next request looks that task up again and continues from wherever it is now:
So whenever that one task changes between two page requests, pagination breaks:
The task is updated. It moves to the top of the order, so the next page starts over from the top and the client gets duplicates.
The task is deleted. The lookup finds nothing and the request fails with InvalidParamsError: Invalid page token, so the client can't continue.
Expected: the token marks a position in the sort order, so changing or deleting one task doesn't send the listing back to the start or invalidate it. Possible fix: put the last_updated and id of the last task returned in the token, and start the next page right after that task: last_updated < token.last_updated OR (last_updated = token.last_updated AND id < token.id). A task updated while the client is paging can still move above the cursor and be missed in that pass, but the listing never goes backwards or fails.
Activity
chore(main): release 1.2.1 (#1283)
mykytanetipa commentedon Sep 30, 2026
@JakubRybak thank you for reporting this! The fix landed in https://github.com/a2aproject/a2a-python/releases/tag/v1.2.1