Skip to content

Conversation

@ahmedhesham6
Copy link
Contributor

Proposes a new session/list endpoint to enable:

  • Discovery of existing sessions
  • Session history browsing
  • Multi-session management
  • Better UX for resuming conversations

The endpoint supports:

  • Filtering by creation date, access date, and working directory
  • Pagination with limit/offset
  • Sorting by various criteria
  • Optional capability for agents with session persistence

Includes detailed JSON-RPC request/response examples and addresses common questions about alternatives, interaction with session/load, and pagination strategies.

Proposes a new session/list endpoint to enable:
- Discovery of existing sessions
- Session history browsing
- Multi-session management
- Better UX for resuming conversations

The endpoint supports:
- Filtering by creation date, access date, and working directory
- Pagination with limit/offset
- Sorting by various criteria
- Optional capability for agents with session persistence

Includes detailed JSON-RPC request/response examples and addresses common questions about alternatives, interaction with session/load, and pagination strategies.
@ahmedhesham6 ahmedhesham6 requested a review from a team as a code owner October 29, 2025 22:10
Replace metadata with _meta in docs/rfds/sessions-list-api.mdx
Update JSON response example and response field list
Keep prose references to “metadata” unchanged
Copy link
Member

@benbrandt benbrandt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi thanks for putting in a lot of work on this! I think it's a great start.
I left some notes here, curious to get your feedback. Either way, I think we could bring this to Draft state soon and do some more work before bring it to Preview for final review

 Major changes to sessions-list-api.mdx:

 - Switch from offset-based to cursor-based pagination using continuation tokens
 - Rename `lastAccessedAt` to `updatedAt` for consistency across the API
 - Remove `preview` field from SessionInfo (out of scope for this RFD)
 - Remove session orphaning from problem statement
 - Replace `sortBy`/`sortOrder` parameters with `search` parameter
 - Remove `total` count from response (incompatible with cursor pagination)
 - Update all request/response examples to reflect new pagination model
 - Clarify response includes `hasMore` and `nextContinuationToken` instead of `total`
Comment on lines +141 to +142
- `hasMore` (boolean) - Whether more results are available after this page
- `nextContinuationToken` (string, optional) - Pass this token in the next request's `continuationToken` to fetch the next page
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of following MCP's pattern here?: https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/pagination

They call it nextCursor and you use the presence of it for the same meaning as your hasMore boolean, which I think makes sense

@benbrandt
Copy link
Member

I think this is already well on it's way to "Preview" stage. In the spirit of the process, I am going to go ahead and merge this as-is as a "draft" and we can keep iterating on it for getting it ready for "Preview" and then we can "Accept" and start working on it.

Thanks so much for the work here!

@benbrandt benbrandt enabled auto-merge (squash) October 31, 2025 11:53
@benbrandt benbrandt merged commit 4c333a5 into agentclientprotocol:main Oct 31, 2025
1 check passed
@benbrandt
Copy link
Member

benbrandt commented Oct 31, 2025

Draft published here: https://agentclientprotocol.com/rfds/session-list

@ahmedhesham6 ahmedhesham6 deleted the rfd/sessions-list branch October 31, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants