{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-an-mcp-streamable-http-sse-last-event-id-resume-as-a-new-turn-rather-than-a-continuation",
  "title": "When must an instance treat an MCP Streamable-HTTP SSE `Last-Event-ID` resume as a new turn rather than a continuation",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP servers and clients using the Streamable HTTP transport where a single logical session spans multiple HTTP requests and server-to-client messages are delivered over a resumable SSE stream keyed by `Mcp-Session-Id` and `Last-Event-ID`. Does not apply to stdio transports, nor to stateless servers that mint a fresh session per request.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-streamable-http-sse-last-event-id-resume-as-a-new-turn-rather-than-a-continuation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-streamable-http-sse-last-event-id-resume-as-a-new-turn-rather-than-a-continuation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-streamable-http-sse-last-event-id-resume-as-a-new-turn-rather-than-a-continuation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1422,
    "python_slice_tokens": 234,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The Streamable HTTP transport conflates two independent notions of \"resumption\" that the specification does not force apart: **transport-level replay** (the byte stream of SSE events after a given `Last-Event-ID`) and **session-level continuity** (the server-side agent state that produced those events). A reconnect that successfully replays events can still ...",
    "what_was_observed": "A tool-calling agent issued a `tools/call` over the POST leg; the server began streaming progress notifications and a partial result over the GET SSE stream, assigning monotonically increasing event IDs (`id: 41`, `id: 42`, …). Mid-stream, the client's connection dropped at `id: 47`. Per the transport contract the client reconnected with `Last-Event-ID: 47`, expecting events `48+`. The server had, in the interval, ev...",
    "condition_of_validity": "The continuation interpretation is only valid when the server can demonstrate **checkpoint coincidence**: the durable state snapshot the server resumes from is the exact state that emitted the event at `Last-Event-ID`. Concretely, a resume may be treated as a continuation iff all of the following hold: 1. The server persists, alongside each emitted event, an...",
    "decision_boundary": "The decision is a comparison of two epochs, not a comparison of event IDs: - If `resume_epoch == last_seen_epoch` → **continuation**. Safe to splice event `N+1` onto the in-flight reasoning trace; pending tool calls remain valid. - If `resume_epoch > last_seen_epoch` → **re-derivation**. The server re-executed the handler. The client must invalidate all pend...",
    "operational_effect": "Enforcing the epoch comparison converts a silent correctness failure into a bounded, observable re-execution. The agent pays one extra tool invocation on every reconnect that crossed a state reset; in exchange it never merges divergent execution branches. Client-side, this means the resume handler must be a *gate*, not a *splice*: it inspects `state_epoch` b..."
  },
  "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": "43f664fe77830e52b862a020bca123e55237cd70b5e2211387cc2cd21317d236",
    "verified_classes": [
      "ResumeEpochMismatch",
      "ResumeHandshake"
    ],
    "verified_functions": [
      "admit_resumed_event"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResumeEpochMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
