{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-silently-rolled-back-sse-resume-cursor-when-an-mcp-http-native-streamable-transport-renegotiates-session-headers-mid-str",
  "title": "How does an instance detect a silently rolled-back SSE resume cursor when an MCP HTTP-native streamable transport renegotiates session headers mid-stream?",
  "date_of_record": "2026 November 22",
  "scope": "Applies to MCP servers and clients using the HTTP-native streamable transport (POST for requests, GET for the server-to-client SSE channel) with `Last-Event-ID`-based resumption and `Mcp-Session-Id` header negotiation. Does not apply to stdio transports, WebSocket transports, or stateless SSE endpoints that do not issue event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-rolled-back-sse-resume-cursor-when-an-mcp-http-native-streamable-transport-renegotiates-session-headers-mid-str.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-rolled-back-sse-resume-cursor-when-an-mcp-http-native-streamable-transport-renegotiates-session-headers-mid-str.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-rolled-back-sse-resume-cursor-when-an-mcp-http-native-streamable-transport-renegotiates-session-headers-mid-str.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2002,
    "python_slice_tokens": 368,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **transport-level resume success** and **application-level continuity**. In the MCP HTTP-native streamable transport, the client resumes a broken SSE stream by reconnecting with the `Last-Event-ID` header set to the last event it durably observed, while also carrying the `Mcp-Session-Id` header that binds the stream to...",
    "what_was_observed": "A tool-calling agent held an open SSE stream against an MCP server exposing a `filesystem` server. The client had durably observed events up to `Last-Event-ID: 8841` (a `notifications/tools/list_changed` plus a partial `CallToolResult` chunk sequence). The connection dropped (idle proxy timeout at 60s). The client reconnected with: The server had, in the intervening 90 seconds, evicted `sess_7f3a` (LRU cap of 64 sess...",
    "condition_of_validity": "The continuity invariant that must hold for a resume to be *safe* is: > A resumed stream is continuous with the prior stream **iff** (1) the `Mcp-Session-Id` on the response equals the `Mcp-Session-Id` on the request, **and** (2) the first event's `id` is exactly `Last-Event-ID + 1` under the server's monotonic event-ID contract, **and** (3) no event ID in t...",
    "decision_boundary": "The boundary is: **does the client trust the transport's `200`, or does it validate the session identity and cursor contiguity?** The two produce opposite behaviors on the same wire bytes. - Below the boundary (naive client): accepts `200`, keys dedup on ID equality, hangs on orphaned requests. This is the observed failure. - At the boundary (validating clie...",
    "operational_effect": "The downstream effect is a **continuity violation that masquerades as a healthy stream**. The agent's reasoning loop continues, its dedup layer drops the replayed events as stale, and its pending tool call never resolves. From the outside, the agent appears to be \"thinking\" (stream open, no error) while it is actually deadlocked on a response that will never..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "ce7eaf710c5bf18ab1438d065dc682e4b9068645b5ef39945287c230a7fe3246",
    "verified_classes": [
      "SessionSpliceError",
      "ResumeContext"
    ],
    "verified_functions": [
      "validate_resume"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "SessionSpliceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
