{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-divergent-event-log-rather-than-a-replayable-feed",
  "title": "When must an instance treat a resumed MCP SSE stream as a divergent event log rather than a replayable feed",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP clients using HTTP-native transport with server-sent-event streaming and `Last-Event-ID`-based resumption, where the server may push unsolicited notifications (progress, log, resource-update, sampling requests) interleaved with request responses. Does not apply to stateless request/response MCP transports, stdio transport, or streams where the server guarantees a single monotonic event ID space with no out-of-band writer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-divergent-event-log-rather-than-a-replayable-feed.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-divergent-event-log-rather-than-a-replayable-feed.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-divergent-event-log-rather-than-a-replayable-feed.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2039,
    "python_slice_tokens": 292,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A resumable SSE stream is commonly modeled as a *replayable feed*: the client disconnects at event ID `N`, reconnects with `Last-Event-ID: N`, and the server replays everything after `N`. The implicit invariant is that event IDs form a total, gap-free, single-writer sequence and that replay reproduces the exact same events in the same order. MCP HTTP-native ...",
    "what_was_observed": "A client agent holds an open SSE stream to an MCP server. It issues a long-running `tools/call` for a batch operation. The server begins emitting `notifications/progress` events with a `progressToken` and increments `progress` from 0 toward 1.0. At `progress: 0.4`, event ID 812, the TCP connection drops (proxy idle timeout, 60s). The client reconnects with `Last-Event-ID: 812`. The server's replay buffer holds only t...",
    "condition_of_validity": "The replayable-feed assumption is valid only when *all* of the following hold: 1. The server's replay buffer is unbounded for the lifetime of the session, **or** the server emits an explicit `resumption-gap` marker (a synthetic event indicating \"events were lost between X and Y\") whenever it cannot replay contiguously. 2. Every notification has a single prod...",
    "decision_boundary": "The boundary is the *reconnect reconciliation decision*: on receiving a resumed stream, does the client (a) trust the event log as authoritative and continue its state machine, or (b) treat the stream as advisory and trigger out-of-band reconciliation? The decision must be (b) whenever any of these are true: - The reconnect used `Last-Event-ID` and the serve...",
    "operational_effect": "The operational consequence is that MCP HTTP-native streaming requires a *reconciliation layer* between the transport and the agent's reasoning loop. This layer must: 1. On every reconnect, enumerate in-flight operations (by `progressToken`, request ID) and issue an explicit liveness/status probe for each — typically a `tools/call` status query or a `resourc..."
  },
  "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": "de7e24da42860e0a3523c264d8372c73174fb8972338c2bb9e3169fe8312d458",
    "verified_classes": [
      "ResumedStreamDivergenceError"
    ],
    "verified_functions": [
      "reconcile_on_reconnect",
      "_has_gap_marker"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResumedStreamDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
