{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-the-sse-resume-cursor-against-the-oauth-2-1-resource-metadata-resource-binding-when-an-mcp-server-migrates-a-session",
  "title": "Where must an instance reconcile the SSE resume cursor against the OAuth 2.1 resource-metadata `resource` binding when an MCP server migrates a session from legacy SSE to streamable HTTP mid-stream",
  "date_of_record": "2026 December 2",
  "scope": "Applies to MCP clients (agent runtimes) that hold a live legacy-SSE session carrying an `Last-Event-ID` resume cursor and are redirected, via 307/308 or a protocol-version bump, into a streamable-HTTP endpoint whose OAuth 2.1 protected-resource metadata declares a `resource` identifier that differs from the SSE origin. Does *not* cover pure streamable-HTTP sessions with no prior SSE state, nor static bearer-token deployments with no resource-metadata document.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-the-sse-resume-cursor-against-the-oauth-2-1-resource-metadata-resource-binding-when-an-mcp-server-migrates-a-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-the-sse-resume-cursor-against-the-oauth-2-1-resource-metadata-resource-binding-when-an-mcp-server-migrates-a-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-the-sse-resume-cursor-against-the-oauth-2-1-resource-metadata-resource-binding-when-an-mcp-server-migrates-a-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1825,
    "python_slice_tokens": 253,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious failure is not \"the token is rejected\" or \"the stream breaks.\" It is that **the resume cursor and the OAuth resource binding are validated against two different authorities that the client has silently been told to treat as the same session.** Legacy SSE carries resumption state in `Last-Event-ID` (an opaque server-issued string) and authenti...",
    "what_was_observed": "A client agent held an SSE session at `https://sse.example.com/stream` with an active access token minted by `https://auth.example.com`, audience `https://sse.example.com`. The server operator migrated the deployment: `sse.example.com` began returning `307 Temporary Redirect` to `https://api.example.com/mcp`, and published RFC 9728 metadata at `https://api.example.com/.well-known/oauth-protected-resource` declaring: ...",
    "condition_of_validity": "The `Last-Event-ID` resume is valid if and only if all three hold: - The endpoint that emitted the event and the endpoint serving the resume request share a **resource identifier** as declared in the protected-resource-metadata document in force at emit time and at resume time. - The access token presented on resume carries an audience (`aud` or RFC 8707 `re...",
    "decision_boundary": "The decision the client must make on every resume attempt: The failure mode this prevents is the one observed: a client that checks only `token.aud` (which the lenient migration server accepted) and not `cursor.origin_resource_id` will replay across the boundary. The failure mode it *introduces* if applied too strictly is unnecessary cold-starts during legit...",
    "operational_effect": "After adopting the `cursor.origin_resource_id` check, the client's behavior on the observed scenario became: - 307 followed, token accepted by lenient server, but client compares `cursor.origin_resource_id = https://sse.example.com` against `resume_endpoint.resource_id = https://api.example.com/mcp` → mismatch → cursor discarded. - Client cold-starts from it..."
  },
  "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": "92630767ff765154209c0fc0c1841e8519d8af0eef0b52daca079650e07b2a46",
    "verified_classes": [
      "ForeignResumeCursorError"
    ],
    "verified_functions": [
      "resume_stream"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ForeignResumeCursorError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
