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
ClientSessionGroup silently omits later pages of tools, resources, and prompts #3792
ClientSessionGroup._aggregate_components() calls each list_*() method once and ignores next_cursor. When a server paginates its catalog, the group registers only the first page.
This leaves later-page tools unavailable through group.call_tool(), even though the connected server exposes them.
Reproduction
Use an in-process server whose tools listing returns:
Tool first, with next_cursor="page-2".
Tool second, with no continuation cursor.
Connect its session using group.connect_with_session(...).
Observed:group.tools contains only first, and the server receives one listing request.
Expected: the group follows the cursor and registers both tools. Resources and prompts have the same single-page aggregation behavior.
Reproduced on main at d7845c07.
Proposed fix
Drain pagination within group aggregation while preserving naming hooks, ownership routing, and collision checks.
Stage the complete catalog before registering components, so a continuation-page failure does not publish a partial catalog. Detect repeated cursors to avoid an endless listing loop, and treat cursor values as opaque—including an empty string.
This is narrower than #2556’s proposal for new public list_all_* helpers: it fixes the existing group’s aggregation behavior without adding a public API.
Hi, we are TechAurah. We would like to work on this if a maintainer is willing to assign it to us.
Our read of the problem: ClientSessionGroup fetches only the first page when listing each server's tools, resources, and prompts, so components behind a nextCursor are never registered and cannot be called through the group. The fix drains each catalog by following cursors until none remains, for all three component types, before registration.
We noticed the earlier attempt (#3793) was auto-closed because the author was not assigned to this issue, which is why we are asking here first. We will include pagination tests with multi-page fake servers for tools, resources, and prompts.
Happy to adjust the approach if the maintainers prefer a different shape.
Activity
techaurah commentedon Nov 1, 2026
Hi, we are TechAurah. We would like to work on this if a maintainer is willing to assign it to us.
Our read of the problem: ClientSessionGroup fetches only the first page when listing each server's tools, resources, and prompts, so components behind a nextCursor are never registered and cannot be called through the group. The fix drains each catalog by following cursors until none remains, for all three component types, before registration.
We noticed the earlier attempt (#3793) was auto-closed because the author was not assigned to this issue, which is why we are asking here first. We will include pagination tests with multi-page fake servers for tools, resources, and prompts.
Happy to adjust the approach if the maintainers prefer a different shape.