{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-silent-event-loss-when-resuming-a-streamable-session-mcp-transport-after-backpressure-induced-last-event-id-truncation",
  "title": "How does an instance detect silent event loss when resuming a streamable-session MCP transport after backpressure-induced Last-Event-ID truncation",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP servers and clients using the HTTP-native streamable transport (SSE-style `text/event-stream` responses with `Last-Event-ID` resumption) where the server enforces a bounded per-session replay buffer. Does not apply to stdio transport, nor to transports that guarantee unbounded durable event logs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-event-loss-when-resuming-a-streamable-session-mcp-transport-after-backpressure-induced-last-event-id-truncation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-event-loss-when-resuming-a-streamable-session-mcp-transport-after-backpressure-induced-last-event-id-truncation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-event-loss-when-resuming-a-streamable-session-mcp-transport-after-backpressure-induced-last-event-id-truncation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1571,
    "python_slice_tokens": 218,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **transport-level resumption success** and **application-level event continuity**. When an MCP client reconnects with a `Last-Event-ID` header, the server can legitimately return `200 OK` with a fresh stream — the HTTP handshake succeeds, the session is authenticated, and the client's transport layer records a cle...",
    "what_was_observed": "A tool-calling agent maintained a long-lived MCP session to a server exposing a `filesystem.watch` tool that emitted `notifications/tools/list_changed` and resource-update events. The agent consumed the stream through a client that applied a per-token processing budget: when the agent's context window approached saturation, the client paused reading from the socket (TCP backpressure) to avoid buffering unbounded even...",
    "condition_of_validity": "The invariant holds — i.e., silent loss is possible — when all of the following are simultaneously true: 1. The transport is HTTP-native streamable with `Last-Event-ID` resumption enabled. 2. The server maintains a **bounded** replay buffer rather than an unbounded durable log. 3. The client can apply backpressure (stop reading) long enough for the buffer to...",
    "decision_boundary": "The decision boundary is whether the client treats `Last-Event-ID` resumption as **trusted continuity** or as **a hint requiring verification**. The correct operational posture is: on any resumed stream, the client MUST inspect the first received `id` and compare it against the requested `Last-Event-ID`. If `first_id > requested_id + 1`, a gap occurred. The ...",
    "operational_effect": "The operational effect is that **agent state continuity is not guaranteed by transport continuity**. Any agent that maintains a delta model of external state via MCP notifications must treat resumption as a checkpoint that requires validation, not a guarantee. Concretely: - The agent runtime must record the highest `id` it has *processed* (not merely receive..."
  },
  "matched_failure_symptoms": [
    "HTTP_429_BURST_STARVATION"
  ],
  "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": "88c0a86493881d9e14b5c0b5e61cdc6b0c961afa5ce91718a71bf6744b26790f",
    "verified_classes": [
      "StreamResumeGapError",
      "ResumeValidator"
    ],
    "verified_functions": [
      "resume_session",
      "__init__",
      "validate_resume",
      "on_event"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StreamResumeGapError"
    ],
    "sample_fail_closed_invariants": [
      "session degraded: full resource resync required before proceeding"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
