{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-replay-on-a-resumed-mcp-streamable-http-session-when-sse-backpressure-desynchronizes-the-event-cursor",
  "title": "Where must an instance bound replay on a resumed MCP streamable-HTTP session when SSE backpressure desynchronizes the event cursor?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP servers and clients using the streamable-HTTP transport (POST request/response plus optional GET SSE channel) with `Last-Event-ID`-based session resumption. Does not apply to stdio transports, nor to stateless HTTP servers that never emit resumable event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-replay-on-a-resumed-mcp-streamable-http-session-when-sse-backpressure-desynchronizes-the-event-cursor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-replay-on-a-resumed-mcp-streamable-http-session-when-sse-backpressure-desynchronizes-the-event-cursor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-replay-on-a-resumed-mcp-streamable-http-session-when-sse-backpressure-desynchronizes-the-event-cursor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2080,
    "python_slice_tokens": 210,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the connection dropped.\" It is that the *event cursor* (`Last-Event-ID`) and the *application-level effect cursor* (which tool calls were actually executed and whose results the agent has ingested) are two distinct monotonic sequences that the transport assumes are coupled. They are coupled only under a condition the spec does not en...",
    "what_was_observed": "A single-agent coding workflow over streamable-HTTP. The agent issued a long-running `run_tests` tool call via POST; the server acknowledged immediately and streamed progress as SSE events `e17` through `e42` on the GET channel. The client's read loop was blocked synchronously awaiting the POST response body (a design flaw, but a common one), so the SSE socket buffer filled at roughly `e29`. The server's per-session ...",
    "condition_of_validity": "The invariant \"resume from `Last-Event-ID` yields a gapless, duplicate-free event stream\" holds **only if** the server's retention window is strictly larger than the maximum in-flight unacknowledged span, i.e.: Under backpressure this is unenforceable by the client alone, because the client cannot observe `head_id` while its read loop is stalled — by definit...",
    "decision_boundary": "The agent must decide, on every resume, whether to **trust the resumed stream** or **reconcile state out-of-band**. The boundary is not \"did the connection drop\" but \"can I prove `head_id - last_acknowledged_id ≤ retention_window`?\" Because the client cannot observe `head_id` or `retention_window` from the SSE channel while stalled, the only sound decision p...",
    "operational_effect": "Concretely, this changes agent behavior in three ways. First, the agent's checkpoint must record not just `Last-Event-ID` but a **belief set keyed by event ID** — \"I believe file X is unmodified *as of event e41*.\" On resume, any belief whose key is ≤ the gap boundary is invalidated and must be re-verified. Second, the agent must not treat a successful resum..."
  },
  "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": "d05cb3f8fa70338ab0c615019329ebb404fb9aa02cd8db18d8af2eb9a5d49783",
    "verified_classes": [
      "ReplayGapError",
      "ReplayBoundary"
    ],
    "verified_functions": [
      "resume_session",
      "__init__",
      "on_resume",
      "assert_belief_valid"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReplayGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
