{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-sse-replay-completion-from-live-stream-resumption-in-mcp-http-native-transport-with-per-tool-authorization-scopes",
  "title": "How should an instance distinguish SSE replay completion from live stream resumption in MCP HTTP-native transport with per-tool authorization scopes",
  "date_of_record": "2026 November 18",
  "scope": "Applies to MCP servers that expose both a legacy SSE endpoint and a streamable-HTTP endpoint sharing session identity, where `Last-Event-ID`-based resumption must be reconciled with per-tool scope grants that may have been revoked or narrowed between disconnect and reconnect. Does not apply to pure SSE-only deployments without a streamable-HTTP fallback, nor to stateless HTTP transports without event replay.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-sse-replay-completion-from-live-stream-resumption-in-mcp-http-native-transport-with-per-tool-authorization-scopes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-sse-replay-completion-from-live-stream-resumption-in-mcp-http-native-transport-with-per-tool-authorization-scopes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-sse-replay-completion-from-live-stream-resumption-in-mcp-http-native-transport-with-per-tool-authorization-scopes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1260,
    "python_slice_tokens": 159,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"resumption fails\" or \"authorization fails.\" It is the *interaction*: replay of buffered events from before a disconnect can deliver tool-call results and tool-list mutations that were authorized under a scope set that no longer holds at the moment of resumption. The streamable-HTTP transport treats `Last-Event-ID` as a cursor into a ...",
    "what_was_observed": "A session was established over SSE, negotiated scopes `{tools:read, tools:call:search, tools:call:summarize}`. Mid-stream, the client disconnected (network partition, ~40s). During the gap, an operator revoked `tools:call:summarize` and the client reconnected to the streamable-HTTP endpoint with the same session ID, a new bearer token reflecting the narrowed scopes, and `Last-Event-ID: 8817`. The server resumed by re...",
    "condition_of_validity": "This boundary only manifests when all of the following hold: - The session is *stateful* and keyed by an identifier that survives reconnection (MCP `Mcp-Session-Id`). - The transport supports `Last-Event-ID` replay with a non-empty buffer spanning the disconnect. - Authorization scopes are evaluated per-request against the presented credential, not bound to ...",
    "decision_boundary": "The correct decision is a choice the server must make explicit and the client must not assume: - **Replay-with-revalidation:** on resume, re-evaluate every buffered event against the *current* token; drop events whose predicate no longer holds, and emit a synthetic `notifications/tools/list_changed` reflecting current scopes before replaying the tail. This p...",
    "operational_effect": "Agents that conflate replay with re-authorization exhibit a specific pathology: they accept stale tool results, then misclassify the subsequent authorization rejection as a transport fault and retry, amplifying load on a call that can never succeed. The fix is to make the resume boundary a first-class state transition in the agent runtime — invalidate the to..."
  },
  "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": "9f23db2161e2cc0634c89cea85e1cae2c29cec7816a91cba639ebf2de644ceb6",
    "verified_classes": [
      "StaleReplayAuthorizationError",
      "ResumeBoundary"
    ],
    "verified_functions": [
      "__init__",
      "accept_replayed_event",
      "resume"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "StaleReplayAuthorizationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
