{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-re-authenticate-mid-stream-oauth-2-1-resource-indicator-binding-loss-across-mcp-streamable-http-resumption-and-sse-fallback-repl",
  "title": "When must an instance re-authenticate mid-stream: OAuth 2.1 resource-indicator binding loss across MCP streamable-HTTP resumption and SSE fallback replay",
  "date_of_record": "2026 November 19",
  "scope": "Applies to MCP clients and servers using the streamable-HTTP transport with `Mcp-Session-Id` resumption and SSE `Last-Event-ID` fallback, where per-tool authorization is enforced via OAuth 2.1 resource indicators (RFC 8707) and audience-restricted access tokens. Does not apply to stdio transports, single-shot request/response tools, or deployments where a single bearer token with no audience restriction authorizes all tools.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-re-authenticate-mid-stream-oauth-2-1-resource-indicator-binding-loss-across-mcp-streamable-http-resumption-and-sse-fallback-repl.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-authenticate-mid-stream-oauth-2-1-resource-indicator-binding-loss-across-mcp-streamable-http-resumption-and-sse-fallback-repl.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-authenticate-mid-stream-oauth-2-1-resource-indicator-binding-loss-across-mcp-streamable-http-resumption-and-sse-fallback-repl.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1884,
    "python_slice_tokens": 276,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **session continuity** and **authorization continuity**. Streamable HTTP gives an MCP client a resumable logical stream: a dropped connection is re-established with `Mcp-Session-Id` plus `Last-Event-ID`, and the server replays buffered SSE events from the last acknowledged event number. This mechanism is designed to pr...",
    "what_was_observed": "Trigger condition: a long-running tool call (e.g., a 90-second `run_report` on a calendar/analytics tool) emits partial results as SSE events numbered `evt-100` through `evt-118`. The client's access token for resource `…/tools/analytics` has a 60-second lifetime. At `evt-112` the connection drops (mobile network handoff). The client reconnects with `Mcp-Session-Id: s-7f3a` and `Last-Event-ID: evt-111`, but its token...",
    "condition_of_validity": "The invariant that must hold for resumption to be safe: > For every replayed or re-dispatched JSON-RPC frame `f` on a resumed stream, the credential presented at resumption time must carry a resource indicator that is a valid audience for the *originating tool* of `f`, not merely for the transport endpoint or the session. This invariant is *not* implied by a...",
    "decision_boundary": "At resumption time, the server must choose between three dispositions for each buffered frame, and the choice is determined by a per-frame audience comparison, not a per-session one: - **Replay** the frame if the current token's resource indicator set contains the frame's originating tool resource. This is the only disposition that preserves both continuity ...",
    "operational_effect": "The practical consequences of getting this wrong are not crashes; they are *silent authorization widening under continuity*. Because the stream keeps flowing and the client keeps receiving well-formed JSON-RPC frames, no error surfaces. The failure is detectable only by logging, per replayed frame, the originating tool resource and the resumption-time token ..."
  },
  "matched_failure_symptoms": [
    "HTTP_502_503_504_CASCADE"
  ],
  "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": "6f8d29637da29214df5966eb700b39c979d14fc111a6727a5c67f98170fb6e9c",
    "verified_classes": [
      "ResourceIndicatorMismatch",
      "BufferedFrame",
      "ResumedCredential"
    ],
    "verified_functions": [
      "resume_stream"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResourceIndicatorMismatch"
    ],
    "sample_fail_closed_invariants": [
      "resumption requires Mcp-Session-Id"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
