{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-of-a-streamable-mcp-session-re-derive-its-backpressure-credit-after-http-native-resumption-and-why-the-eventsource-last-event-i",
  "title": "Where must an instance of a streamable MCP session re-derive its backpressure credit after HTTP-native resumption, and why the EventSource `Last-Event-ID` alone is insufficient",
  "date_of_record": "2026 November 16",
  "scope": "Applies to MCP servers and clients using the HTTP-native (Streamable HTTP) transport where a session is resumed after a transport-level interruption via `Last-Event-ID` replay, and where the server applies per-session flow control (credit windows, in-flight request caps, or write-buffer watermarks). Does not apply to stdio transports, to WebSocket transports with native TCP backpressure, or to sessions that are resumed by full re-initialization rather than event replay.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-of-a-streamable-mcp-session-re-derive-its-backpressure-credit-after-http-native-resumption-and-why-the-eventsource-last-event-i.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-a-streamable-mcp-session-re-derive-its-backpressure-credit-after-http-native-resumption-and-why-the-eventsource-last-event-i.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-a-streamable-mcp-session-re-derive-its-backpressure-credit-after-http-native-resumption-and-why-the-eventsource-last-event-i.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1975,
    "python_slice_tokens": 292,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **event continuity** and **credit continuity**. `Last-Event-ID` guarantees the former: the server can replay every SSE event with a sequence number greater than the client's last acknowledged ID, so the client observes no logical gap in the message stream. It says nothing about the latter. Credit — the count of bytes o...",
    "what_was_observed": "In a deployment serving long-running tool-call sessions over Streamable HTTP, sessions were interrupted by a load balancer recycling backend connections at a 300-second idle timeout. Clients reconnected with `Last-Event-ID` and received correct replay. Two failure signatures appeared, both traceable to the credit ledger: 1. **Credit leak on replay.** After resumption, the server's per-session in-flight counter was ob...",
    "condition_of_validity": "The single-ledger model (one counter for both ordering and credit) is valid only under the conjunction of: - the transport provides reliable, ordered delivery with no replay (i.e., no resumption ever occurs), **or** - the server never applies backpressure (credit is infinite; the ledger is purely advisory), **or** - replay is idempotent with respect to credi...",
    "decision_boundary": "The operational rule is a hard boundary, not a heuristic: > **On resumption, the server MUST reset the session's credit ledger to the client's advertised receive window (or the server's configured initial window, whichever is smaller), and MUST treat every replayed event as consuming credit *at replay time*, not at original emit time. The pre-disconnect emit...",
    "operational_effect": "With the corrected boundary, three observable changes appear: - **In-flight counters track delivered, not emitted, events.** The cap becomes a true concurrency limit on client-visible work rather than a proxy for server-side emit rate, which is the property operators actually want when sizing per-session limits. - **Replay is bounded by the client's 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": "9d7f00123af3e618f2261515625ba2b85cd89e2b81112cb9d93e37d9042e425a",
    "verified_classes": [
      "CreditLedgerInvariantError",
      "SessionCreditState"
    ],
    "verified_functions": [
      "resume_session"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CreditLedgerInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
