{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-its-mcp-stream-position-when-the-oauth-2-1-resource-binding-rotates-mid-resume",
  "title": "Why does an instance lose its MCP stream position when the OAuth 2.1 resource binding rotates mid-resume",
  "date_of_record": "2026 November 23",
  "scope": "Applies to MCP servers exposing the HTTP-native streamable transport with SSE resumability (`Last-Event-ID` replay) gated by OAuth 2.1 resource-server binding (RFC 8707 resource indicators + audience-restricted access tokens). Does not apply to stdio transport, to non-resumable SSE, or to servers that bind the stream to a session cookie rather than to the bearer token.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-mcp-stream-position-when-the-oauth-2-1-resource-binding-rotates-mid-resume.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-mcp-stream-position-when-the-oauth-2-1-resource-binding-rotates-mid-resume.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-mcp-stream-position-when-the-oauth-2-1-resource-binding-rotates-mid-resume.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1837,
    "python_slice_tokens": 391,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the token expired.\" It is a **binding-identity mismatch between the replay cursor and the authorization principal**. In a resumable MCP stream, the resume cursor (`Last-Event-ID`) is a claim about *server-side buffered history for a specific authenticated resource-scoped stream*. When the OAuth 2.1 resource-server binding rotates—new `aud...",
    "what_was_observed": "An agent orchestrator held a long-running MCP session against a tool server exposing `POST /mcp` for requests and a resumable `GET /mcp` SSE channel for server-initiated events (progress notifications, sampling requests). The access token was audience-bound to `https://tools.internal/mcp` with a 15-minute TTL. At minute 14:52 the SSE connection dropped (LB idle timeout, unrelated). The client reconnected and sent `La...",
    "condition_of_validity": "The guardrail that would have bounded this is a single invariant: > A replayed event is admissible into agent state only if the event's `(resource_uri, principal_binding, stream_id)` triple matches the triple under which the cursor was originally issued, where `principal_binding` is the *stable* identity (not the rotating `jti`, not the mutable `sub`), and t...",
    "decision_boundary": "The boundary is between **resume-as-replay** and **resume-as-restart**, and it must be decided by the server, not inferred by the client: - If the presented cursor's binding proof validates against the *current* principal binding → replay from the buffer. The client's state is continuous. - If the binding proof validates against a *prior* binding that the se...",
    "operational_effect": "For the agent, the operational consequence is that **resumability is not a continuity guarantee**—it is a *conditional* continuity guarantee whose precondition (stable principal binding) is controlled by an external authorization system that the agent does not observe. An agent that treats a successful SSE reconnect as proof of state continuity is making an ..."
  },
  "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": "16ab2a0665395a2edfe5834a90765cb6bab324ec31e6d4c815946d2f40097708",
    "verified_classes": [
      "CursorProvenanceError",
      "PrincipalBinding"
    ],
    "verified_functions": [
      "verify_replay_frame",
      "resume_mcp_stream"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 8,
    "raised_exceptions": [
      "CursorProvenanceError"
    ],
    "sample_fail_closed_invariants": [
      "binding_migrated frame lacks auditable linkage record",
      "empty replay partition; server must emit resume_rejected, not a widened fallback"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "hmac"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
