{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-an-mcp-streamable-session-resumption-has-silently-re-based-onto-a-fresh-event-stream",
  "title": "What structural signals indicate an MCP streamable-session resumption has silently re-based onto a fresh event stream",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP clients and servers using the HTTP-native \"streamable\" transport where a session is identified by `Mcp-Session-Id` and server-to-client messages flow over a resumable SSE stream keyed by `Last-Event-ID`. Does not apply to stdio transport, nor to stateless one-shot request/response deployments where no session header is issued.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-streamable-session-resumption-has-silently-re-based-onto-a-fresh-event-stream.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-streamable-session-resumption-has-silently-re-based-onto-a-fresh-event-stream.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-streamable-session-resumption-has-silently-re-based-onto-a-fresh-event-stream.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2083,
    "python_slice_tokens": 341,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **resumption** (the server replays the event-log suffix strictly after the client's `Last-Event-ID` and continues the same logical stream) and **re-basing** (the server accepts the request, issues a `200` with `Content-Type: text/event-stream`, and then emits events from a *fresh* event-ID namespace because the origina...",
    "what_was_observed": "A tool-using agent maintained an MCP session against a server that streamed tool-progress notifications and server-initiated `sampling/createMessage` requests over SSE. The client persisted `Last-Event-ID` after every event. On a network blip, the client reconnected with `GET /mcp` plus `Mcp-Session-Id` and `Last-Event-ID: 4471`. The server had, in the intervening 90 seconds, evicted the session's ring buffer (capaci...",
    "condition_of_validity": "The invariant that bounds this failure is: **a resumption is valid only if the server's first emitted event has an ID strictly greater than the client's `Last-Event-ID`, and the client's ledger contains no tool invocation lacking a terminal event.** This is checkable at the client, at connect time, before any event is handed to the reasoning loop. This condi...",
    "decision_boundary": "The client must draw a hard line at connect time, and the line is drawn on the event-ID sequence, not on the status code: - **ID strictly greater than cursor → resume.** Hand events to the reasoning loop normally. - **ID equal to cursor → duplicate delivery.** Drop the event; it was already processed. Log it as a transport anomaly but do not fail the session...",
    "operational_effect": "When the boundary is enforced, re-basing is converted from a silent state-corruption event into a loud, recoverable one. The agent stops, the ledger is reconciled, and the unknown-outcome tool calls are re-queried or failed closed before any further reasoning occurs. The cost is a session re-initialization and a possible re-query round-trip; the benefit is t..."
  },
  "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": "9c3c01cf0b50108f657e5690107d1b3fd9e794f16fbb4cc1ecc884b9c8ed0d57",
    "verified_classes": [
      "SessionRebaseError",
      "LedgerInconsistencyError",
      "Event",
      "ToolLedger"
    ],
    "verified_functions": [
      "validate_resumption",
      "handle_reconnect",
      "on_tool_call",
      "on_tool_result",
      "unresolved"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "LedgerInconsistencyError",
      "SessionRebaseError"
    ],
    "sample_fail_closed_invariants": [
      "resumed stream emitted no events; cannot establish ID continuity"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
