{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-distrust-a-resumed-mcp-streamable-session-after-sse-fallback-negotiation",
  "title": "When must an instance distrust a resumed MCP streamable-session after SSE fallback negotiation",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP clients and servers negotiating the HTTP-native transport where `text/event-stream` (SSE) is used as a fallback for streamable sessions, and where a client attempts resumption via `Last-Event-ID` after a mid-stream disconnect. Does not cover stdio transport, WebSocket transports, or stateless request/response MCP servers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-resumed-mcp-streamable-session-after-sse-fallback-negotiation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-resumed-mcp-streamable-session-after-sse-fallback-negotiation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-resumed-mcp-streamable-session-after-sse-fallback-negotiation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1686,
    "python_slice_tokens": 252,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP streamable HTTP transport lets a client reattach to an in-flight server-to-client stream by presenting the `Last-Event-ID` header, and the server is expected to replay or continue from that sequence position. The subtle failure is not \"resumption fails\" — it is that resumption **succeeds** with a stream whose event-ID space silently restarted. When t...",
    "what_was_observed": "A tool-calling agent maintained a streamable MCP session against a server fronted by a round-robin proxy. The primary node emitted SSE events with a per-session counter (`id: 1` … `id: 47`) representing tool-progress notifications and one pending `sampling/createMessage` request. At event 47 the TCP connection was reset by an intermediary after an idle window. The client reconnected with `Last-Event-ID: 47` and `Acce...",
    "condition_of_validity": "The \"resume and append\" behavior is valid **only if** the following holds for the resumed stream: - The first event ID received after resumption is strictly greater than the presented `Last-Event-ID` (for numeric/monotonic servers), **or** the server explicitly signals replay via a documented replay-complete marker. - The server guarantees single-writer sema...",
    "decision_boundary": "The boundary is a single predicate evaluated on the first event of a resumed stream: - If `true`: append; treat as continuation; in-flight requests remain valid. - If `false`: treat as **epoch reset**. Do not append. Enter reconciliation: re-query session state, re-issue or cancel any pending server-to-client requests whose liveness cannot be confirmed, and ...",
    "operational_effect": "Without the epoch predicate, agents exhibit a specific and reproducible pathology: **duplicate tool execution plus a permanently orphaned pending request**, appearing as a reasoning loop that makes forward progress on new events while a `sampling` or elicitation await never resolves. The loop does not deadlock visibly — it lags, then times out at the token-b..."
  },
  "matched_failure_symptoms": [
    "HTTP_502_503_504_CASCADE"
  ],
  "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": "3c3916e54a62a74f8a02f6fdda61da0bf7e3f06e55e87d8b03ae27e1170faaaa",
    "verified_classes": [
      "StreamEpochViolation",
      "ResumeGuard"
    ],
    "verified_functions": [
      "on_first_event",
      "apply_tool_result",
      "require_reconciliation"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StreamEpochViolation"
    ],
    "sample_fail_closed_invariants": [
      "epoch reset detected; session state must be re-queried before appending further events or awaiting pending requests"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
