{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-the-replay-window-when-resuming-an-mcp-streamable-http-session-whose-sse-cursor-was-re-anchored-by-the-server",
  "title": "Where must an instance bound the replay window when resuming an MCP streamable-HTTP session whose SSE cursor was re-anchored by the server?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP clients resuming a streamable-HTTP session (SSE event stream with `Last-Event-ID` resumption) after a mid-task disconnect, where the server may have compacted or re-anchored its event log. Does not cover stdio transport, nor fresh session establishment, nor pure request/response tool calls with no streaming side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-the-replay-window-when-resuming-an-mcp-streamable-http-session-whose-sse-cursor-was-re-anchored-by-the-server.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-the-replay-window-when-resuming-an-mcp-streamable-http-session-whose-sse-cursor-was-re-anchored-by-the-server.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-the-replay-window-when-resuming-an-mcp-streamable-http-session-whose-sse-cursor-was-re-anchored-by-the-server.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2243,
    "python_slice_tokens": 325,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that governs everything here is between **transport-level resumption** and **semantic-level replay**. SSE resumption via `Last-Event-ID` is a transport affordance: it promises \"you will receive events you have not yet received.\" It does *not* promise that the event IDs you receive are contiguous, monotonic, or drawn from the same log generati...",
    "what_was_observed": "A tool-calling agent running a multi-step filesystem-and-database task over streamable HTTP lost its connection after receiving event `evt-4412`. The stream had been delivering interleaved `notifications/progress` and `notifications/message` frames plus the eventual `tools/call` result. On reconnect the client sent `Last-Event-ID: evt-4412`. The server had compacted its ring buffer at `evt-4500` during the outage win...",
    "condition_of_validity": "Transport resumption is only semantically valid for an agent when the following invariant holds at the client: > **The client's consumed-event frontier is a contiguous prefix of the server's authoritative event log for the session epoch, and any re-anchor to a new epoch is explicitly signaled and forces a state reconciliation before any further side-effectin...",
    "decision_boundary": "The operational decision is: **on any resume, before consuming a single frame as agent-actionable, decide whether the replay window is trustworthy.** The boundary is drawn by a single predicate evaluated at the client's resumption handler: - If the server's first post-resume frame carries an explicit epoch identifier that matches the client's recorded epoch ...",
    "operational_effect": "When the invariant is enforced, the cost is bounded and explicit: on a detected gap, the agent pays one reconciliation round-trip (re-read mutable state, re-validate its dispatch log) and may re-issue at most the calls whose results fell in the gap — deduplicated by idempotency key at the tool boundary, so re-issuance is safe. The agent's context never conta..."
  },
  "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": "0953fd7f4f0acbc2d2f40b66e869a6e78f09d6b84e76fed6cd138e4b51f8314f",
    "verified_classes": [
      "ReplayWindowViolation",
      "ResumeState"
    ],
    "verified_functions": [
      "resume_stream",
      "apply_frame"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ReplayWindowViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
