{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-sse-event-id-cursors-against-streamable-http-resumption-tokens-when-migrating-mcp-transport-mid-session",
  "title": "Where must an instance reconcile SSE event-ID cursors against streamable-HTTP resumption tokens when migrating MCP transport mid-session",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP clients and servers transitioning a live tool-calling session from the legacy HTTP+SSE transport (dual-endpoint, `GET /sse` + `POST /messages`) to the streamable-HTTP transport (single endpoint, `Mcp-Session-Id` header, optional `Last-Event-ID` resumption). Does not cover stdio transport, WebSocket variants, or fresh sessions negotiated entirely over streamable-HTTP from the first byte.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-sse-event-id-cursors-against-streamable-http-resumption-tokens-when-migrating-mcp-transport-mid-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-sse-event-id-cursors-against-streamable-http-resumption-tokens-when-migrating-mcp-transport-mid-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-sse-event-id-cursors-against-streamable-http-resumption-tokens-when-migrating-mcp-transport-mid-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1965,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The legacy SSE transport and the streamable-HTTP transport both expose an event-ID / resumption mechanism, but they assign **different semantics to the cursor**. In SSE, `Last-Event-ID` is a *replay hint* scoped to a single long-lived `GET /sse` stream: the server, if it retains a buffer, resumes emitting events after that ID on that specific connection. In ...",
    "what_was_observed": "A coding agent held a streamable session `Mcp-Session-Id: 7f3a…` against a tool server, executing a five-step plan: `read_file` → `edit_file` → `run_tests` → `edit_file` → `run_tests`. Midway through step 3, the server's SSE compatibility shim (still serving the old `GET /sse` for a co-deployed client) emitted `id: 4812` on the legacy stream. The agent's HTTP layer, configured to \"resume on reconnect,\" captured `Last...",
    "condition_of_validity": "The guardrail holds only under the following conditions, and each must be asserted explicitly: 1. **Cursor provenance is tracked per transport.** Every resumption token carries a tag identifying which stream family minted it (`sse:<conn_id>:<id>` vs `sth:<session_id>:<id>`). A token whose tag does not match the target endpoint is never sent; it is discarded ...",
    "decision_boundary": "The boundary is crossed the moment an agent's transport layer presents a resumption cursor to an endpoint whose session ID does not match the cursor's minting session. Operationally: - **Below the boundary** (same transport, same session): forward `Last-Event-ID` unchanged; the server's buffer semantics apply. - **At the boundary** (transport migration, same...",
    "operational_effect": "When the invariant is enforced, the visible effect is a bounded, observable reconciliation: the agent pauses the plan, issues a session-state query, learns its true acknowledged position, and resumes from the last committed `tools/call`. Wall-clock cost is one extra round-trip per migration; the alternative is silent divergent execution. When it is not enfor..."
  },
  "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": "b4fc96a7f000983398ced8a53f87988a5c538b94ee6a030beb2255860f51ae73",
    "verified_classes": [
      "ResumptionCursorMismatch",
      "Cursor"
    ],
    "verified_functions": [
      "reanchor_cursor",
      "build_resume_request"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResumptionCursorMismatch"
    ],
    "sample_fail_closed_invariants": [
      "pending request lacks jsonrpc id; cannot dedupe after re-anchor"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
