{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-stream-offsets-when-an-mcp-http-native-session-resumes-after-a-backpressure-induced-partial-frame",
  "title": "Where must an instance reconcile stream offsets when an MCP HTTP-native session resumes after a backpressure-induced partial frame",
  "date_of_record": "2026 November 23",
  "scope": "Applies to MCP servers/clients using the HTTP-native transport (Streamable HTTP with `Mcp-Session-Id`, SSE-style resumable event streams, and `Last-Event-ID`-based resumption) when a consumer applies backpressure and disconnects mid-frame. Does not apply to stdio transports, nor to transports that buffer entire JSON-RPC messages atomically before emitting.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-stream-offsets-when-an-mcp-http-native-session-resumes-after-a-backpressure-induced-partial-frame.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-stream-offsets-when-an-mcp-http-native-session-resumes-after-a-backpressure-induced-partial-frame.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-stream-offsets-when-an-mcp-http-native-session-resumes-after-a-backpressure-induced-partial-frame.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1683,
    "python_slice_tokens": 221,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the stream dropped.\" It is that a resumable HTTP-native MCP stream carries two independent notions of position that can silently desynchronize: the **logical event position** (the `id:` of the last fully-emitted SSE event, which the client echoes as `Last-Event-ID`) and the **byte/JSON-RPC frame boundary** (whether the last event's `...",
    "what_was_observed": "A tool-calling agent streamed a long `tools/call` result (a ~1.2 MB JSON-RPC response) over Streamable HTTP. The client applied application-level backpressure (a bounded 64 KB read buffer) because the downstream reasoning loop had saturated its context window and paused reads to checkpoint. After ~40 s of no reads, the server's 30 s keep-alive/backpressure timer fired and the connection was torn down. Trace: 1. Serve...",
    "condition_of_validity": "The `Last-Event-ID` resumption contract is valid **only** when the following hold simultaneously: - The server appends `id:` **after** a fully-flushed `data:` block (ordering guarantee), and does not emit `id:` for an event whose payload was truncated. - The client, on any transport discontinuity, **flushes its partial-frame buffer** and resumes parsing from...",
    "decision_boundary": "On reconnect, the client must decide per buffered fragment: **discard** vs. **resume-append**. The decision rule is not \"did I receive bytes for event N+1\" but \"did I receive a complete, terminator-delimited event for N+1, and did I durably advance my acknowledged offset to N+1.\" Concretely: - If the partial buffer contains an unterminated event **and** the ...",
    "operational_effect": "The observable signature is a JSON-RPC parse error on a resumed stream whose `Last-Event-ID` looked correct, followed by a retry that re-executes a non-idempotent tool. The blast radius is duplicate side effects (writes, payments, state mutations) masked as \"transient stream errors.\" Mitigations that actually bound it: 1. **Terminator-gated acknowledgment.**..."
  },
  "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": "c72eebb5c7f76a82bfde2cc3ad9738b17597d5ba24325c74e543cf339b55ac04",
    "verified_classes": [
      "StreamResumptionFrameError"
    ],
    "verified_functions": [
      "resume_stream"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "StreamResumptionFrameError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
