{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-a-streamable-mcp-session-after-the-server-has-silently-rotated-its-sse-event-id-epoch",
  "title": "What happens when an instance resumes a streamable MCP session after the server has silently rotated its SSE event-ID epoch",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP clients using the HTTP-native \"streamable\" transport that reconnect to a server-initiated SSE stream via `Last-Event-ID` after a dropped connection. Does not apply to stdio transports, or to sessions where the client never received any events before the drop (no resumption cursor to replay from).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-a-streamable-mcp-session-after-the-server-has-silently-rotated-its-sse-event-id-epoch.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-a-streamable-mcp-session-after-the-server-has-silently-rotated-its-sse-event-id-epoch.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-a-streamable-mcp-session-after-the-server-has-silently-rotated-its-sse-event-id-epoch.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1863,
    "python_slice_tokens": 415,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the connection dropped.\" Dropping is expected and recoverable. The failure is that the client's `Last-Event-ID` cursor is *valid syntactically but semantically stale*: the server has, since the client's last successful read, restarted its event-ID generator (process restart, horizontal scale-out to a new replica, or an internal epoch...",
    "what_was_observed": "A tool-calling agent ran a long task (a multi-step code-refactor loop) against an MCP server exposing a `run_command` tool plus a server-initiated progress/notification stream. Sequence: 1. Client opens the streamable session, receives events with IDs `e-1001 … e-1042`. Event `e-1042` carries a partial-result notification the agent is mid-consumption of. 2. The TCP connection resets (LB idle timeout, 60s, common defa...",
    "condition_of_validity": "The silent-resumption failure requires all of the following to co-occur: - **Server-initiated stream with resumption semantics** (`Last-Event-ID` honored), not a client-polled endpoint. - **Event IDs are epoch-local** (per-process or per-replica counters) rather than **globally monotonic and durable** (e.g., a persisted sequence in the session store, or a hy...",
    "decision_boundary": "The client cannot resolve the ambiguity from the resumption response alone. It must choose a policy at the boundary of \"empty replay\": - **Trust silence (unsafe):** treat empty resumption as caught-up. Correct only under the globally-monotonic-ID invariant, which the client cannot verify. - **Distrust silence (safe, costly):** on *any* reconnection, re-fetch...",
    "operational_effect": "Without an epoch discriminator, the agent system acquires a class of *silent continuity violations*: mid-task state that looks continuous but has a hole. These are the worst kind for autonomous agents because they defeat the usual recovery reflexes — there is no exception, no non-2xx, no timeout. The agent's reasoning continues on a corrupted premise, and th..."
  },
  "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": "0bfb08f522b87fa5c22a18bf9f866f13914cec71f0b95c0050661e65787fccef",
    "verified_classes": [
      "StaleEpochResumptionError"
    ],
    "verified_functions": [
      "resume_streamable_session",
      "continue_agent_loop"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StaleEpochResumptionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
