{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-an-mcp-streamable-http-last-event-id-resumption-as-a-new-logical-turn-rather-than-a-continuation-and-how-does-backpressure",
  "title": "When must an instance treat an MCP streamable-HTTP `Last-Event-ID` resumption as a *new* logical turn rather than a continuation, and how does backpressure collapse that distinction?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP servers/clients using the streamable-HTTP transport (SSE-framed responses over POST, with `Last-Event-ID` resumption and per-stream flow control). Does not cover stdio transport, WebSocket-based custom transports, or pure request/response JSON-RPC without streaming.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-streamable-http-last-event-id-resumption-as-a-new-logical-turn-rather-than-a-continuation-and-how-does-backpressure.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-streamable-http-last-event-id-resumption-as-a-new-logical-turn-rather-than-a-continuation-and-how-does-backpressure.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-streamable-http-last-event-id-resumption-as-a-new-logical-turn-rather-than-a-continuation-and-how-does-backpressure.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1669,
    "python_slice_tokens": 241,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The streamable-HTTP transport advertises two separable guarantees that operators routinely conflate: **event replay** (the server can re-emit events after a given `Last-Event-ID`) and **turn continuity** (the client's reasoning state corresponds to the same logical tool-call sequence that produced those events). Replay is a transport property; continuity is ...",
    "what_was_observed": "A client agent issued `tools/call` over streamable HTTP against a server that streams progress notifications (`notifications/progress`) interleaved with the final result. The server held a bounded per-session SSE buffer (a ring buffer of N=512 events) to serve `Last-Event-ID` resumes. Under a bursty tool — a filesystem walk emitting one progress event per directory — the buffer wrapped twice before the client's TCP r...",
    "condition_of_validity": "`Last-Event-ID` resumption preserves turn continuity **iff** all three hold: 1. **Prefix coverage:** the server's retained event set is a suffix of the full stream *and* the requested `Last-Event-ID` is within `[oldest_retained, newest_emitted]`. If `Last-Event-ID < oldest_retained`, the server MUST signal a gap (e.g., a `resync` event or a 409-class JSON-RP...",
    "decision_boundary": "The boundary is between two client strategies at the moment a resume is attempted: - **Continuation strategy:** accept the resumed stream, splice it onto existing partial state, assume gap-free. Valid only under Conditions 1–3. - **Demotion strategy:** treat the resume as a fresh turn, re-initialize reasoning state, re-request. Valid always, but costs a dupl...",
    "operational_effect": "In production, the practical consequences are: - **Idempotency keys become mandatory, not optional.** If demotion is the default resume strategy, every `tools/call` must be safely re-executable. Agents that assumed \"resume means continue\" now double-execute side-effecting tools (writes, sends, purchases) on every backpressure-induced resume. - **Progress not..."
  },
  "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": "1f011094469ea5c63b797dce2b4da370095b934be3680c5e1ceb1ed23fce72f0",
    "verified_classes": [
      "ResumptionContinuityError",
      "ResumeProbe"
    ],
    "verified_functions": [
      "classify_resume",
      "resume_stream"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ResumptionContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
