Clean up sessions after legacy initialize parsing fails
Los mantenedores suelen responder en 2 días
@bolinfest ya está trabajando en esto.
Desde el 14/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Problem
A legacy Streamable HTTP initialize response can include an MCP session ID in
its response headers while its JSON or SSE payload is malformed or empty. The
client currently parses the initialize payload before its normal session
cleanup state is established. If parsing fails, the worker exits without
sending the bounded DELETE for the session that the server already created.
The same gap exists when Auto lifecycle discovery falls back to legacy
initialize.
Proposed direction
- Capture the raw session ID from a JSON or SSE initialize response before
parsing it. - Retain the headers that were actually used for that initialize request.
- If initialize parsing fails, run the existing bounded DELETE behavior before
returning the parse error. - On successful parsing and protocol negotiation, replace that provisional
cleanup state with the normal negotiated session cleanup state. - Cover both direct legacy initialization and discovery fallback.
This proposal is deliberately limited to initialize parse failures. Draft
#1267 introduces a broader run_session/outer-cancellation lifecycle and also
centralizes cleanup. The focused change would not copy that refactor, stalled
body handling, or its cancellation suite. I would be happy to fold the narrow
case into #1267 instead if that is the preferred direction.
Planned validation
Source-module transport tests would supply malformed and empty initialize SSE
streams carrying a raw session ID. Direct initialize and Auto fallback cases
would verify failure plus exactly one DELETE for that raw session.
Would maintainers prefer this focused fix as a separate PR or as a test and
delta on #1267?
- Lenguaje dominante
- Rust
- Estrellas
- 4k
- Forks
- 662
- Merge medio
- 3 d 20 h
- PR fusionados (30 d)
- 30
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/rust-sdk
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP statusPosiblemente ocupada @aton-of-data la tomó hace 5 días. Abiertobug P2 ready for work T-security T-transport
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
modelcontextprotocol/rust-sdk#1339 ·
Los mantenedores suelen responder en 2 días
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopePosiblemente ocupada @jstar0 la tomó hace 8 días. Abiertobug P1 ready for work T-security T-transport
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
modelcontextprotocol/rust-sdk#1330 ·
Los mantenedores suelen responder en 2 días
-
P3 question Stale T-documentation T-enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
modelcontextprotocol/rust-sdk#1155 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Expose OAuth discovery and registration results for application-owned flowsPosiblemente ocupada @connor4312 la tomó hoy. Abiertoenhancement P2 ready for work T-security
modelcontextprotocol/rust-sdk#1371 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
Two rmcp tests fail on Windows: connection-refused text check and `npm` spawn in test_with_jsPosiblemente ocupada @bolinfest la tomó hace 1 día. Abiertobug P2 ready for work T-test
modelcontextprotocol/rust-sdk#1364 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 2 días
Todos los issues de modelcontextprotocol/rust-sdk
Issues similares
-
[1.x Bug] run-operation --sql reports success but rolls back writes on transaction-capable adaptersAbiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
dbt-labs/dbt#16784 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:cli bug good first issue priority:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
rtk-ai/rtk#4615 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitPosiblemente ocupada @myOmikron la tomó hoy. Abiertobug ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Windows: mio 1.2.3 named-pipe use-after-free panics the native IPC broker and hangs every toolAbiertoplatform:windows tool triaged wontfix
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
resources: add a regression test confirming admin mint still works after the #16 SAC handoffPosiblemente ocupada @Daniexie la tomó hoy. Abiertocontracts good first issue Stellar Wave
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OlaGreat/starbound-realms#137 · 1 comentario ·