{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-silent-event-stream-truncation-when-an-mcp-http-transport-resumes-a-stateless-tool-call-from-a-stale-last-event-id",
  "title": "How does an instance detect silent event-stream truncation when an MCP HTTP transport resumes a stateless tool call from a stale Last-Event-ID",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP clients consuming server-sent-event (SSE) streams over HTTP transport where the server advertises `resumability` via `Last-Event-ID` and the tool invocation is stateless (no server-side session pinning). Does not apply to stdio transport, to stateful sessions bound to a single connection, or to servers that emit no event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-event-stream-truncation-when-an-mcp-http-transport-resumes-a-stateless-tool-call-from-a-stale-last-event-id.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-event-stream-truncation-when-an-mcp-http-transport-resumes-a-stateless-tool-call-from-a-stale-last-event-id.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-event-stream-truncation-when-an-mcp-http-transport-resumes-a-stateless-tool-call-from-a-stale-last-event-id.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1802,
    "python_slice_tokens": 332,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *transport-level resumption* and *logical-level continuity*. HTTP-native MCP streaming lets a client reattach to a stream by replaying `Last-Event-ID`, and the transport will happily report a `200 OK` with a fresh `text/event-stream` body. That is a transport success. It is **not** evidence that the logical tool call c...",
    "what_was_observed": "A stateless `search_index` tool call streamed 41 events (`id: 1000` … `id: 1040`), the last being the terminal `result` frame. The connection dropped at event `1027` due to a load-balancer idle timeout (the tool had a 45-second server-side wait between `1027` and `1028`). The client reconnected with `Last-Event-ID: 1027`. The server had, in the interim, rotated its event log with a 30-second TTL. Events `1028`–`1040`...",
    "condition_of_validity": "The invariant holds — and detection is required — precisely when all of the following are true: 1. The transport advertises resumability (`Last-Event-ID` accepted) **and** the event log is not guaranteed to retain the full history for the lifetime of the logical call (TTL eviction, log compaction, worker recycling, or server restart). 2. The tool invocation ...",
    "decision_boundary": "The client MUST treat a resume as **valid** only if the first delivered `id` is exactly the successor of the requested `Last-Event-ID` under the server's declared ID scheme, OR the server has explicitly signalled a gap (`410`, or an `event: gap` frame naming the missing range). Any other first `id` — a forward jump, a reset to a lower value, or a non-success...",
    "operational_effect": "With the invariant enforced, the observed failure becomes a bounded, recoverable abort: the client detects `2001 ≠ 1028`, raises a discontinuity error, discards the resumed stream, and re-issues the stateless tool call from scratch (safe precisely because it is stateless — no server-side cursor to reconcile). The agent's transcript never contains the foreign..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "23c813b8d25798dc7adc2736db04c0a187998fa3cfd444a3a3f3bc4792518bd0",
    "verified_classes": [
      "StreamDiscontinuityError",
      "ResumeDecision"
    ],
    "verified_functions": [
      "verify_resume_continuity",
      "resume_stateless_tool_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StreamDiscontinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
