{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-an-mcp-streamable-http-tool-result-whose-sse-stream-resumed-under-a-rotated-oauth-scope-after-a-last-event-id-reconnect",
  "title": "How should an instance treat an MCP Streamable-HTTP tool result whose SSE stream resumed under a rotated OAuth scope after a `Last-Event-ID` reconnect",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients using the Streamable HTTP transport (POST for requests, GET/SSE for server-initiated messages) with `Last-Event-ID` resumption and per-tool OAuth scope enforcement, where the authorization server may rotate or narrow scopes between the original request and a reconnect. Does not apply to stdio transports, to SSE streams without resumption, or to servers that bind a stream's authorization to the original token for its entire lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-streamable-http-tool-result-whose-sse-stream-resumed-under-a-rotated-oauth-scope-after-a-last-event-id-reconnect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-streamable-http-tool-result-whose-sse-stream-resumed-under-a-rotated-oauth-scope-after-a-last-event-id-reconnect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-streamable-http-tool-result-whose-sse-stream-resumed-under-a-rotated-oauth-scope-after-a-last-event-id-reconnect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2166,
    "python_slice_tokens": 292,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the reconnect failed.\" The failure is that the reconnect **succeeded** and delivered a tool result that the *current* credential is no longer authorized to receive. In MCP's Streamable HTTP transport, a single logical tool call can span multiple HTTP exchanges: the client POSTs `tools/call`, the server responds either with a direct `appli...",
    "what_was_observed": "Trace from a representative incident, an agent invoking a `repo.read_file` tool gated by scope `repo:contents`: 1. `t₀` — Agent POSTs `tools/call` with `Authorization: Bearer T₁` (scopes: `repo:contents`, `repo:metadata`). Server accepts, returns `200` with `Content-Type: text/event-stream`, opens stream `S`. 2. `t₁` — Server emits `event: message`, `id: 41`, `data: {\"jsonrpc\":\"2.0\",\"id\":\"call-7\",\"result\":{\"partial\":...",
    "condition_of_validity": "The replay-honors-stale-authorization hazard is live only when all of the following hold simultaneously; drop any one and the failure cannot occur: - **Resumption is enabled** (`Last-Event-ID` accepted by the server) *and* the server buffers events keyed by stream, not by (stream, credential-fingerprint). - **Scope enforcement is per-tool and evaluated at di...",
    "decision_boundary": "The boundary is not \"resume or don't resume.\" It is **what the client is permitted to do with a resumed stream when the credential fingerprint changed.** Three regimes: - **Same credential fingerprint, same scope set** → resume transparently. Event-position continuity is sufficient; authorization continuity is trivially preserved. This is the fast path and s...",
    "operational_effect": "Without the guardrail, the observable effect is **silent scope laundering**: a tool result computed under a broad grant is delivered under a narrow one, and the agent's downstream reasoning treats it as authorized data. This corrupts the agent's trust model in a way that is invisible to replay-based verification—an auditor replaying the transcript sees a coh..."
  },
  "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": "e50f13fc67a4b7763ada0518fcb4685585a2e974b46d949b8745a3315d753f7d",
    "verified_classes": [
      "ScopeContinuityError",
      "Credential",
      "StreamOpen"
    ],
    "verified_functions": [
      "resume_stream",
      "handle_resume",
      "fingerprint"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ScopeContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
