{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-resumed-sse-stream-has-silently-crossed-a-capability-boundary-after-mcp-session-re-negotiation",
  "title": "How does an instance detect that a resumed SSE stream has silently crossed a capability boundary after MCP session re-negotiation",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP servers using the HTTP-native transport with `text/event-stream` responses, `Last-Event-ID` resumability, and `Mcp-Session-Id`-scoped capability negotiation. Does not apply to stdio transports, nor to servers that renegotiate capabilities per-request rather than per-session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-resumed-sse-stream-has-silently-crossed-a-capability-boundary-after-mcp-session-re-negotiation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-resumed-sse-stream-has-silently-crossed-a-capability-boundary-after-mcp-session-re-negotiation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-resumed-sse-stream-has-silently-crossed-a-capability-boundary-after-mcp-session-re-negotiation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1880,
    "python_slice_tokens": 367,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP streamable-HTTP transport treats two things as independent that are actually coupled: **event-log continuity** (the `Last-Event-ID` cursor) and **capability scope** (the negotiated feature set bound to `Mcp-Session-Id`). A client that resumes a dropped SSE stream with a valid `Last-Event-ID` will receive events that the server *did* emit under the ol...",
    "what_was_observed": "A client opened a session (`Mcp-Session-Id: s1`) negotiating capabilities `{tools, sampling, resources.subscribe}`. The server streamed tool-progress events tagged `id: 100..140`. The connection dropped at `id: 141`. The server's session manager, under memory pressure, evicted `s1` and — because the client reconnected within the grace window — reassigned the *same* session ID to a fallback worker that supported only ...",
    "condition_of_validity": "The failure is *reachable* only when all of the following hold simultaneously: 1. The server implements `Last-Event-ID` replay against a persistent event log that outlives the session's capability binding. 2. The server reuses `Mcp-Session-Id` values across capability-set changes (eviction-reassign, rolling deploys, or explicit re-negotiation without a new s...",
    "decision_boundary": "The operational decision is: **on every SSE resume, does the client treat `Last-Event-ID` acceptance as sufficient, or does it require an explicit capability-scope assertion from the server before consuming replayed events?** - **Trust-cursor (default, broken):** consume replayed events immediately. Correct only when session IDs are never reused across capab...",
    "operational_effect": "Without the scope assertion, the failure is *silent and expensive*: the client executes sampling requests, tool calls, or resource subscriptions that the server has already disowned, burning tokens and wall-clock time on results that are discarded. The client's own logs show a healthy stream (monotonic IDs, valid frames, no errors), so post-hoc diagnosis req..."
  },
  "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": "a7383a6f2d73e481bb48580dde291f3e8c5498b43a5915949fb50ccd95246ef5",
    "verified_classes": [
      "CapabilityScopeMismatch",
      "NonResumableSession",
      "SessionState"
    ],
    "verified_functions": [
      "digest_capabilities",
      "resume_stream",
      "safe_resume_or_reinit",
      "__post_init__"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CapabilityScopeMismatch",
      "NonResumableSession"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
