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
AHP listSessions ignores limit and cursor pagination parameters #329619
The VS Code AHP server accepts the paginated listSessions request shape, but ignores both limit and cursor and returns the complete session catalogue without a nextCursor.
I reproduced this through the local AHP endpoint:
{ "channel": "ahp-root://", "limit": 5 }
The response contained 188 items.
Code pointers
The protocol documents listSessions as incrementally pageable, including an example request with limit and a response with nextCursor:
If more items exist, the result includes an opaque nextCursor.
Passing that cursor returns the next page.
Unknown cursors are rejected as invalid parameters, as documented.
Pages are ordered most-recently-modified first.
At minimum, paging in ProtocolServerHandler would bound the wire response. To avoid enumerating the full provider catalogue as well, pagination would need to flow through IAgentService.listSessions() and its providers.
The SDK does not support limiting the number of sessions we get back currently. So a limit here would just reduce wire traffic and the number of sessions we need to enrich from database stores. For my machine where I have lots of sessions, the list is 500ms to load. But being able to load like the first 10 quickly would be cool and then async-load the rest.
Activity
connor4312 commentedon Aug 7, 2026
The SDK does not support limiting the number of sessions we get back currently. So a limit here would just reduce wire traffic and the number of sessions we need to enrich from database stores. For my machine where I have lots of sessions, the list is 500ms to load. But being able to load like the first 10 quickly would be cool and then async-load the rest.