{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resume-as-a-fresh-subscription-rather-than-a-gap-fill-and-why-silent-replay-loss-fol",
  "title": "Under what conditions must an instance treat an MCP `Last-Event-ID` resume as a fresh subscription rather than a gap-fill, and why silent replay loss follows from getting it wrong",
  "date_of_record": "2026 December 2",
  "scope": "Applies to MCP servers implementing HTTP-native transport with stateless streaming (SSE over POST responses or a dedicated GET stream) and resumable session semantics keyed on `Last-Event-ID`. Does not apply to stdio transport, nor to servers that buffer the full event log in durable storage with monotonic, unbounded sequence numbers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resume-as-a-fresh-subscription-rather-than-a-gap-fill-and-why-silent-replay-loss-fol.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resume-as-a-fresh-subscription-rather-than-a-gap-fill-and-why-silent-replay-loss-fol.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resume-as-a-fresh-subscription-rather-than-a-gap-fill-and-why-silent-replay-loss-fol.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2120,
    "python_slice_tokens": 392,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"resume drops events.\" It is a conflation between two semantically different operations that share one wire primitive: - **Gap-fill resume:** the client has a valid cursor `Last-Event-ID = N`, the server still holds events `N+1..M` in its replay buffer, and the correct response is to emit the missing tail before switching to live mode. - *...",
    "what_was_observed": "A tool-calling agent loop over MCP HTTP transport. The server emitted SSE events per tool-call progress tick, each tagged `id: <monotonic-int>`. Replay buffer: an in-memory ring of the last 1,000 events per session, with session state pinned to a single process behind a load balancer. No sticky routing. Trace: 1. Agent issues `tools/call`, opens the POST-response SSE stream, receives events `id: 4001..4012` (progress...",
    "condition_of_validity": "The \"treat resume as gap-fill\" behavior is only correct under the conjunction: - The replay store is **durable across process boundaries** (shared log, not per-process ring), AND - The cursor namespace is **globally monotonic** across all processes that can serve the session (not per-process counters), AND - The server can **prove** `Last-Event-ID N` is `≥ f...",
    "decision_boundary": "On receiving a resume with `Last-Event-ID: N`, the server must resolve exactly one of three states before emitting any live event: 1. **In-window:** `N ≥ floor − 1` and `N ≤ head`. Emit `N+1..head` from the buffer, then live. This is a true gap-fill. 2. **Below-floor (evicted):** `N < floor − 1`. The buffer cannot satisfy the gap. **Do not clamp.** Emit an e...",
    "operational_effect": "Without the epoch token and the explicit gap marker, the system exhibits **silent continuity loss**: the agent's perceived event history is a non-contiguous splice of two process lifetimes, and every downstream reasoning step that depends on \"I saw the tool call complete\" is now operating on a false premise. The agent does not error; it confabulates a comple..."
  },
  "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": "9bd3267376bd8ff19dbd357af393c97a2550c75bc1ece9d0b920b35846dfdf0a",
    "verified_classes": [
      "ReplayCursorUnverifiable"
    ],
    "verified_functions": [
      "resolve_resume",
      "handle_resume"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReplayCursorUnverifiable"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
