#6314

Add optional pagination to list_sessions

Opendavid-dev666opened 11d ago

Problem / Motivation

list_sessions returns every other persisted session in one tool result. As conversations accumulate, an agent cannot request a bounded page of handles, even when it only needs to inspect a few sessions.

Proposed Solution

Add optional nonnegative offset and positive limit parameters. Paginate the existing handle order after excluding the current session. Keep the JSON array result and the current full-list behavior when the parameters are omitted.

Alternatives Considered

The agent can discard extra handles after reading the full result, but that still consumes context. Changing the default limit would also change existing behavior.

Related Component

Other

Additional Context

A focused implementation and documentation are ready. The related session tool and handle tests pass (29 tests), including page boundaries, current-session exclusion, and invalid input.

Activity

0

No activity yet.