{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-an-mcp-session-negotiation-replay-hazard-when-resumable-sse-is-silently-upgraded-to-streamable-http",
  "title": "What structural signals indicate an MCP session-negotiation replay hazard when resumable SSE is silently upgraded to streamable HTTP",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP clients that begin a session over HTTP+SSE with `Last-Event-ID` resumption and are then redirected or renegotiated onto the streamable-HTTP transport mid-session, where per-tool capability scopes were established against the SSE session. Does not apply to pure stdio transports or to sessions that never emit resumable event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-session-negotiation-replay-hazard-when-resumable-sse-is-silently-upgraded-to-streamable-http.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-session-negotiation-replay-hazard-when-resumable-sse-is-silently-upgraded-to-streamable-http.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-session-negotiation-replay-hazard-when-resumable-sse-is-silently-upgraded-to-streamable-http.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1729,
    "python_slice_tokens": 247,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the connection dropped.\" It is that the *resumption identity* and the *capability scope identity* are two different keys that the protocol lets you conflate. On SSE, the session is anchored by an event-ID cursor (`Last-Event-ID`) that the server uses to replay missed events; the capability scope is anchored separately by the `initialize` ...",
    "what_was_observed": "A client initialized over SSE, received `initialize` result with `capabilities.tools` and a per-tool scope map granting `filesystem.read` to `read_file` but not `filesystem.write` to `write_file`. It then executed a long `read_file` tool call whose result was streamed as multiple SSE events carrying monotonic `id:` values. Mid-call, the server returned a `308 Permanent Redirect` to the streamable-HTTP endpoint (a rou...",
    "condition_of_validity": "The hazard is live only when all of the following hold simultaneously: - The transport carries a resumable cursor (`Last-Event-ID` or equivalent) *and* a session identifier across a redirect or upgrade. - The receiving endpoint keys its replay log by cursor alone, not by `(session, cursor)` pair. - Per-tool capability scope is established at handshake and is...",
    "decision_boundary": "The boundary is whether the client treats cursor continuity as sufficient evidence of session continuity. It is not. The correct decision rule: - On any redirect or upgrade, the client must treat the carried cursor as *advisory only* and must require the new endpoint to echo the negotiated per-tool scope map in its renegotiation response. - If the renegotiat...",
    "operational_effect": "Without the guardrail, the failure is silent and the damage is a scope escalation that the auditor catches only on replay — after the tool result has already been consumed downstream. The client's reasoning loop has acted on a `stat` result it was never granted, and the error compounds: subsequent tool calls are planned on the assumption that `filesystem.sta..."
  },
  "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": "7b29d77f5e6edc8e9d9ce033e006c9d733ebe933e314d5d3bc22591b818e22df",
    "verified_classes": [
      "ScopeLaunderingError",
      "NegotiatedScope"
    ],
    "verified_functions": [
      "resume_after_redirect"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ScopeLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
