modelcontextprotocol / modelcontextprotocol/csharp-sdk

Support stream resumption in stateless mode

Open
#1,131 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement needs confirmation P3
Dominant language
C#
Stars
4.5k
Forks
814
Avg merge
9d 19h
Merged PRs (30d)
4

Description

There are some changes we need to make outside the implementation of ISseEventStreamStore. For example, in stateless mode, sessions currently get disposed immediately when the POST request completes. This causes the message processing loop to stop, which means new messages never reach the transport and never get written to the event stream store. So, we'd need to revisit the behavior around session lifetimes in stateless mode. I could probably do that in this PR, but it's already quite large and I figured leaving out stateless mode support for now could be a way to scope things down. If you think it should be included in this PR, I could go ahead and try to get it working.

Originally posted by @MackinnonBuck in https://github.com/modelcontextprotocol/csharp-sdk/pull/1077#discussion_r2669879747

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing ISseEventStreamStore, session lifetime handling in stateless mode, and the message processing loop described in the issue. Done means sessions remain available after the POST completes, new messages reach the transport, and those messages are written to the event stream store for resumption.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.