{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-mid-stream-mcp-sse-resumption-that-silently-re-binds-a-stale-oauth-2-1-resource-indicator-to-a-replayed-event-cursor",
  "title": "How does an instance detect a mid-stream MCP SSE resumption that silently re-binds a stale OAuth 2.1 resource indicator to a replayed event cursor",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP clients using HTTP-native transport (streamable HTTP with `text/event-stream` responses and `Last-Event-ID` resumption) against remote tool servers gated by OAuth 2.1 with RFC 8707 resource indicators. Does not cover stdio transport, WebSocket transports, or servers that terminate and restart the stream without honoring event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-mid-stream-mcp-sse-resumption-that-silently-re-binds-a-stale-oauth-2-1-resource-indicator-to-a-replayed-event-cursor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-mid-stream-mcp-sse-resumption-that-silently-re-binds-a-stale-oauth-2-1-resource-indicator-to-a-replayed-event-cursor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-mid-stream-mcp-sse-resumption-that-silently-re-binds-a-stale-oauth-2-1-resource-indicator-to-a-replayed-event-cursor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1999,
    "python_slice_tokens": 357,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the connection dropped\" and it is not \"the token expired.\" It is the conjunction: a resumable SSE stream carries a `Last-Event-ID` cursor across a token refresh, and the server accepts the cursor under a *different* resource indicator than the one the cursor was minted under. The client believes it has a continuous logical stream; the ser...",
    "what_was_observed": "A remote tool server (call it `tools.internal`, resource indicator `https://tools.internal/mcp`) fronted by an authorization server issuing short-lived (300s) access tokens. The MCP client holds a long-lived `GET /mcp` SSE stream for server-initiated notifications and a series of `POST /mcp` requests for tool calls. The stream is resumable: each event carries `id: <monotonic>`, and the client reconnects with `Last-Ev...",
    "condition_of_validity": "The resumption is *sound* only if all three hold at the moment `Last-Event-ID` is honored: - **Audience continuity:** the `aud` (or `resource`) of the authorizing token equals the resource indicator under which the cursor's originating events were produced. Equality is on the normalized URI (RFC 3986 §6.2.2), not the raw string. - **Grant continuity:** the a...",
    "decision_boundary": "The boundary is: **does the client treat a successful SSE resume as proof of session continuity, or as proof of transport continuity only?** - If the client treats resume as *session* continuity, it will trust subsequent events as belonging to its original logical session. This is the default and it is wrong whenever the token's grant lineage changed across ...",
    "operational_effect": "In the observed incident, the silent rebind cost 41k tokens of retry loop, one spurious `-32601`, and a 6-minute agent stall before budget exhaustion. The deeper cost was a corrupted episodic memory: the agent recorded \"tool `globex.search` unavailable\" as a durable fact, which propagated into its semantic store and caused a later task to skip a legitimate 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": "bb20a0d613a4d969e92da80aaf760f68a1898ea33273bea25e33ff72a689e631",
    "verified_classes": [
      "StreamRebindError",
      "SessionBinding"
    ],
    "verified_functions": [
      "_normalize_resource",
      "_grant_fingerprint",
      "validate_resume",
      "resume_sse_stream"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "StreamRebindError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
