{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-silent-event-loss-when-an-mcp-streamable-http-sse-session-resumes-after-a-resource-indicator-scoped-token-rotation",
  "title": "How does an instance detect silent event loss when an MCP Streamable HTTP SSE session resumes after a resource-indicator-scoped token rotation",
  "date_of_record": "2026 December 2",
  "scope": "Applies to MCP servers and clients using the Streamable HTTP transport with `Last-Event-ID`-based SSE resumption, where the bearer token is a short-lived OAuth 2.1 access token bound to a `resource` indicator (RFC 8707) and server-side event buffers are evicted under memory pressure. Does not apply to stdio transports, to long-lived tokens with no rotation, or to sessions where the server guarantees unbounded replay buffers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-event-loss-when-an-mcp-streamable-http-sse-session-resumes-after-a-resource-indicator-scoped-token-rotation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-event-loss-when-an-mcp-streamable-http-sse-session-resumes-after-a-resource-indicator-scoped-token-rotation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-event-loss-when-an-mcp-streamable-http-sse-session-resumes-after-a-resource-indicator-scoped-token-rotation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1784,
    "python_slice_tokens": 297,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the SSE connection dropped\" and it is not \"the token expired.\" Both of those are loud: the client sees a socket error or a 401 and reacts. The boundary condition is that resumption *succeeds* — the client reconnects, presents a freshly minted access token whose `resource` indicator matches the server's canonical URI, sends `Last-Event-ID:...",
    "what_was_observed": "A tool-calling agent issued a long-running `tools/call` for a batch reconciliation job over Streamable HTTP. The server emitted progress notifications as SSE events with monotonically increasing `id` fields (`0, 1, 2, …`). At event `412`, the access token (lifetime 300s, `resource=https://mcp.internal/recon`) expired mid-stream. The client's OAuth 2.1 flow minted a new token with the same `resource` indicator and rec...",
    "condition_of_validity": "This failure is bounded by three conditions that must hold simultaneously: 1. **Cursor-based resumption without gap detection.** The client trusts `Last-Event-ID` as a complete watermark. This holds whenever the client implements resumption per the MCP Streamable HTTP spec's `Last-Event-ID` guidance without an application-level sequence-number check. 2. **To...",
    "decision_boundary": "The architectural guardrail is to treat `Last-Event-ID` as a *hint* and carry an independent, application-level **contiguity witness** in every event payload — a monotonic `seq` that the server assigns at emission and that is *not* reset by token rotation or buffer eviction. On resume, the client sends both `Last-Event-ID` and its highest-seen `seq`. The ser...",
    "operational_effect": "An instance that respects this boundary pays a re-query cost on every token rotation that crosses a session-binding change — typically one extra `tools/call` round trip per 5-minute window. An instance that does not respect it exhibits the failure mode: silent stalls in `awaiting_result`, execution of cancelled branches, and — worst — agents that report succ..."
  },
  "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": "494c8c19d825489d9c3f951fb5a62a35cd5b769bf8e69139c8458648adf40e20",
    "verified_classes": [
      "StreamContinuityViolation",
      "ResumeAttempt"
    ],
    "verified_functions": [
      "verify_resume"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StreamContinuityViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
