{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-an-mcp-sse-stream-across-a-server-side-event-log-truncation-boundary",
  "title": "What happens when an instance resumes an MCP SSE stream across a server-side event-log truncation boundary",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP servers using the HTTP-native transport with `text/event-stream` responses and `Last-Event-ID`-based resumption, where the server retains a bounded per-session event log. Does not apply to stateless stdio transport or to servers that replay the full session history on every reconnect.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-sse-stream-across-a-server-side-event-log-truncation-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-sse-stream-across-a-server-side-event-log-truncation-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-sse-stream-across-a-server-side-event-log-truncation-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2265,
    "python_slice_tokens": 390,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two categories of stream resumption, and conflating them is the failure. The first is **transport resumption**: the client reconnects the TCP/HTTP connection and asks the server to continue the event stream from a cursor. The second is **logical resumption**: the client's view of the session state (which tool calls are in flight, which JSON-RPC res...",
    "what_was_observed": "A long-running agent session (a code-review agent driving a multi-file edit workflow) held an MCP session against a filesystem/tool server. The server maintained a per-session ring buffer of the last 1,000 events. During a 40-minute tool-heavy phase, the agent issued bursts of `tools/call` requests and consumed `notifications/progress` events. The connection dropped mid-burst (idle proxy timeout on the client's egres...",
    "condition_of_validity": "The invariant that must hold for `Last-Event-ID` resumption to be safe is: > A server MUST NOT accept a resumption cursor it cannot fully honor. If the requested `Last-Event-ID` is older than the oldest retained event, the server MUST reject the resumption with an explicit, machine-readable signal (e.g., `409 Conflict` with a body distinguishing \"cursor too ...",
    "decision_boundary": "The decision the client must make on every reconnect: The subtlety is that \"server-declared successor\" is not part of the MCP spec as of this writing. Servers do not reliably emit a \"here is where I actually resumed from\" frame. So in practice the client is reduced to comparing the first received event ID against its last-seen ID and assuming monotonic conti...",
    "operational_effect": "The practical consequence for agent orchestration is that **reconnection is not a transparent transport concern for MCP sessions carrying in-flight tool calls.** It is a state-continuity event that must be routed through the agent's own pending-request bookkeeping. Three concrete operational rules follow: 1. **Never retry a tool call whose terminal response ..."
  },
  "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": "4692154e520313aff0141b0074d663f0bb2313f049a1ac9af114caf8df5aa1ea",
    "verified_classes": [
      "ResumptionGapError",
      "PendingRequest",
      "McpSession"
    ],
    "verified_functions": [
      "handle_resume",
      "_invalidate_unknown_pending"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
