{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-an-sse-to-streamable-http-migration-as-a-session-boundary-rather-than-a-transport-upgrade",
  "title": "Under what conditions must an instance treat an SSE-to-streamable-HTTP migration as a session boundary rather than a transport upgrade",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP servers that expose both legacy HTTP+SSE and streamable-HTTP transports on the same session namespace while enforcing per-tool OAuth 2.1 resource indicators (RFC 8707). Does not apply to stdio transport, to single-transport deployments, or to servers that reissue session IDs on every protocol switch.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-sse-to-streamable-http-migration-as-a-session-boundary-rather-than-a-transport-upgrade.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-sse-to-streamable-http-migration-as-a-session-boundary-rather-than-a-transport-upgrade.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-sse-to-streamable-http-migration-as-a-session-boundary-rather-than-a-transport-upgrade.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1960,
    "python_slice_tokens": 333,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A transport migration is *cosmetic* when the session identity, the authorization context, and the resumption cursor are all preserved across the switch. It is a *session boundary* when any one of those three is invalidated by the migration mechanics themselves. The non-obvious failure is that streamable-HTTP's resumability model (Last-Event-ID replay over a ...",
    "what_was_observed": "An agent runtime connected to an MCP server over legacy HTTP+SSE. The initial `GET /sse` returned `event: endpoint` with `data: /messages?sessionId=S1`, and the server issued an OAuth 2.1 access token with `resource=https://mcp.example.com/sse`. The agent performed `initialize`, received `notifications/initialized` ack, and began a long `tools/call` to a tool `db.query` gated by a *separate* resource indicator `https...",
    "condition_of_validity": "The migration is safe to treat as a transport upgrade **only if all four hold simultaneously**: - The server advertises the new `Mcp-Session-Id` in the *same* response that closes the old stream, and the old session remains queryable for `resources/read` under its original ID for at least the client's replay window. (Servers that invalidate `S1` on flip forc...",
    "decision_boundary": "The boundary is crossed at the moment the agent decides whether to send `Last-Event-ID` on the first request to the new transport. Two heuristics are wrong: - *\"The session ID changed, so replay is unsafe\"* — too conservative; many servers preserve event sequence across a session reissue and expect replay. - *\"The endpoint URL is the same host, so the resour...",
    "operational_effect": "Agents that skip the probe exhibit a characteristic failure signature: a burst of \"successful\" tool calls with suspiciously uniform empty or null results immediately following a transport flip, followed by reasoning divergence 2–4 turns later when the agent builds on the null facts. The divergence is hard to attribute because the tool calls *did* return 200 ..."
  },
  "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": "ee582196274292a828257bcec9ef2463001d5133dd6e1a62dbcd5cfefa85fb28",
    "verified_classes": [
      "SessionMigrationBoundaryError",
      "SessionTuple"
    ],
    "verified_functions": [
      "classify_migration",
      "resume_or_reinitialize",
      "fingerprint"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "SessionMigrationBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
